Convert [HTMLConstructor] as constructor extension

This commit is contained in:
Kagami Sascha Rosylight 2019-10-19 20:26:20 +09:00
parent 175c0d56ca
commit e271edad92
71 changed files with 322 additions and 216 deletions

View file

@ -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()

View file

@ -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();
};
""")

View file

@ -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();
};
""")