mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Convert [HTMLConstructor] as constructor extension
This commit is contained in:
parent
175c0d56ca
commit
e271edad92
71 changed files with 322 additions and 216 deletions
|
@ -105,8 +105,8 @@ def WebIDLTest(parser, harness):
|
|||
|
||||
parser = parser.reset()
|
||||
parser.parse("""
|
||||
[HTMLConstructor]
|
||||
interface TestHTMLConstructor {
|
||||
[HTMLConstructor] constructor();
|
||||
};
|
||||
""")
|
||||
results = parser.finish()
|
||||
|
@ -138,8 +138,8 @@ def WebIDLTest(parser, harness):
|
|||
threw = False
|
||||
try:
|
||||
parser.parse("""
|
||||
[HTMLConstructor(DOMString a)]
|
||||
interface TestHTMLConstructorWithArgs {
|
||||
[HTMLConstructor] constructor(DOMString a);
|
||||
};
|
||||
""")
|
||||
results = parser.finish()
|
||||
|
@ -153,8 +153,8 @@ def WebIDLTest(parser, harness):
|
|||
threw = False
|
||||
try:
|
||||
parser.parse("""
|
||||
[HTMLConstructor]
|
||||
callback interface TestHTMLConstructorOnCallbackInterface {
|
||||
[HTMLConstructor] constructor();
|
||||
};
|
||||
""")
|
||||
results = parser.finish()
|
||||
|
@ -168,9 +168,9 @@ def WebIDLTest(parser, harness):
|
|||
threw = False
|
||||
try:
|
||||
parser.parse("""
|
||||
[HTMLConstructor]
|
||||
interface TestHTMLConstructorAndConstructor {
|
||||
constructor();
|
||||
[HTMLConstructor] constructor();
|
||||
};
|
||||
""")
|
||||
results = parser.finish()
|
||||
|
@ -183,10 +183,10 @@ def WebIDLTest(parser, harness):
|
|||
threw = False
|
||||
try:
|
||||
parser.parse("""
|
||||
[HTMLConstructor]
|
||||
interface TestHTMLConstructorAndConstructor {
|
||||
[Throws]
|
||||
constructor();
|
||||
[HTMLConstructor] constructor();
|
||||
};
|
||||
""")
|
||||
results = parser.finish()
|
||||
|
@ -200,9 +200,9 @@ def WebIDLTest(parser, harness):
|
|||
threw = False
|
||||
try:
|
||||
parser.parse("""
|
||||
[HTMLConstructor]
|
||||
interface TestHTMLConstructorAndConstructor {
|
||||
constructor(DOMString a);
|
||||
[HTMLConstructor] constructor();
|
||||
};
|
||||
""")
|
||||
results = parser.finish()
|
||||
|
@ -216,10 +216,10 @@ def WebIDLTest(parser, harness):
|
|||
threw = False
|
||||
try:
|
||||
parser.parse("""
|
||||
[HTMLConstructor]
|
||||
interface TestHTMLConstructorAndConstructor {
|
||||
[Throws]
|
||||
constructor(DOMString a);
|
||||
[HTMLConstructor] constructor();
|
||||
};
|
||||
""")
|
||||
results = parser.finish()
|
||||
|
@ -235,10 +235,10 @@ def WebIDLTest(parser, harness):
|
|||
threw = False
|
||||
try:
|
||||
parser.parse("""
|
||||
[HTMLConstructor]
|
||||
interface TestHTMLConstructorAndConstructor {
|
||||
[ChromeOnly]
|
||||
constructor();
|
||||
[HTMLConstructor] constructor();
|
||||
};
|
||||
""")
|
||||
results = parser.finish()
|
||||
|
@ -252,10 +252,10 @@ def WebIDLTest(parser, harness):
|
|||
threw = False
|
||||
try:
|
||||
parser.parse("""
|
||||
[HTMLConstructor]
|
||||
interface TestHTMLConstructorAndConstructor {
|
||||
[Throws, ChromeOnly]
|
||||
constructor();
|
||||
[HTMLConstructor] constructor();
|
||||
};
|
||||
""")
|
||||
results = parser.finish()
|
||||
|
@ -270,10 +270,10 @@ def WebIDLTest(parser, harness):
|
|||
threw = False
|
||||
try:
|
||||
parser.parse("""
|
||||
[HTMLConstructor]
|
||||
interface TestHTMLConstructorAndConstructor {
|
||||
[ChromeOnly]
|
||||
constructor(DOMString a);
|
||||
[HTMLConstructor] constructor();
|
||||
};
|
||||
""")
|
||||
results = parser.finish()
|
||||
|
@ -288,10 +288,10 @@ def WebIDLTest(parser, harness):
|
|||
threw = False
|
||||
try:
|
||||
parser.parse("""
|
||||
[HTMLConstructor]
|
||||
interface TestHTMLConstructorAndConstructor {
|
||||
[Throws, ChromeOnly]
|
||||
constructor(DOMString a);
|
||||
[HTMLConstructor] constructor();
|
||||
};
|
||||
""")
|
||||
results = parser.finish()
|
||||
|
|
|
@ -50,23 +50,9 @@ def WebIDLTest(parser, harness):
|
|||
threw = False
|
||||
try:
|
||||
parser.parse("""
|
||||
[Global, HTMLConstructor, Exposed=TestHTMLConstructorGlobal]
|
||||
interface TestHTMLConstructorGlobal {
|
||||
};
|
||||
""")
|
||||
|
||||
results = parser.finish()
|
||||
except:
|
||||
threw = True
|
||||
|
||||
harness.ok(threw, "Should have thrown.")
|
||||
|
||||
parser = parser.reset()
|
||||
threw = False
|
||||
try:
|
||||
parser.parse("""
|
||||
[HTMLConstructor, Global, Exposed=TestHTMLConstructorGlobal]
|
||||
[Global, Exposed=TestHTMLConstructorGlobal]
|
||||
interface TestHTMLConstructorGlobal {
|
||||
[HTMLConstructor] constructor();
|
||||
};
|
||||
""")
|
||||
|
||||
|
|
|
@ -28,24 +28,9 @@ def WebIDLTest(parser, harness):
|
|||
threw = False
|
||||
try:
|
||||
parser.parse("""
|
||||
[NoInterfaceObject, HTMLConstructor]
|
||||
interface TestHTMLConstructorNoInterfaceObject {
|
||||
};
|
||||
""")
|
||||
|
||||
results = parser.finish()
|
||||
except:
|
||||
threw = True
|
||||
|
||||
harness.ok(threw, "Should have thrown.")
|
||||
|
||||
parser = parser.reset()
|
||||
|
||||
threw = False
|
||||
try:
|
||||
parser.parse("""
|
||||
[HTMLConstructor, NoInterfaceObject]
|
||||
[NoInterfaceObject]
|
||||
interface TestHTMLConstructorNoInterfaceObject {
|
||||
[HTMLConstructor] constructor();
|
||||
};
|
||||
""")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue