Update WebIDL.py (#32495)

* Update WebIDL.py

* Update WebIDL.py

* Add builtin-array.patch

* Fix CodegenRust.py and Configuration.py

* Fix missing downcasts

* mach fmt

* Update check and comment to explain why we need this check

* Update Global of DissimilarOriginWindow.webidl
This commit is contained in:
Ngo Iok Ui (Wu Yu Wei) 2024-06-15 13:22:42 +09:00 committed by GitHub
parent 19067366df
commit 8eed3b442b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
77 changed files with 1658 additions and 793 deletions

View file

@ -1,4 +1,4 @@
import traceback
import WebIDL
def WebIDLTest(parser, harness):
@ -6,15 +6,15 @@ def WebIDLTest(parser, harness):
try:
parser.parse(
"""
[Global, Exposed=TestConstructorGlobal]
[Global=TestConstructorGlobal, Exposed=TestConstructorGlobal]
interface TestConstructorGlobal {
constructor();
};
"""
)
results = parser.finish()
except:
parser.finish()
except WebIDL.WebIDLError:
threw = True
harness.ok(threw, "Should have thrown.")
@ -24,14 +24,14 @@ def WebIDLTest(parser, harness):
try:
parser.parse(
"""
[Global, Exposed=TestLegacyFactoryFunctionGlobal,
[Global=TestLegacyFactoryFunctionGlobal, Exposed=TestLegacyFactoryFunctionGlobal,
LegacyFactoryFunction=FooBar]
interface TestLegacyFactoryFunctionGlobal {
};
"""
)
results = parser.finish()
except:
parser.finish()
except WebIDL.WebIDLError:
threw = True
harness.ok(threw, "Should have thrown.")
@ -41,14 +41,14 @@ def WebIDLTest(parser, harness):
try:
parser.parse(
"""
[LegacyFactoryFunction=FooBar, Global,
[LegacyFactoryFunction=FooBar, Global=TestLegacyFactoryFunctionGlobal,
Exposed=TestLegacyFactoryFunctionGlobal]
interface TestLegacyFactoryFunctionGlobal {
};
"""
)
results = parser.finish()
except:
parser.finish()
except WebIDL.WebIDLError:
threw = True
harness.ok(threw, "Should have thrown.")
@ -58,15 +58,15 @@ def WebIDLTest(parser, harness):
try:
parser.parse(
"""
[Global, Exposed=TestHTMLConstructorGlobal]
[Global=TestHTMLConstructorGlobal, Exposed=TestHTMLConstructorGlobal]
interface TestHTMLConstructorGlobal {
[HTMLConstructor] constructor();
};
"""
)
results = parser.finish()
except:
parser.finish()
except WebIDL.WebIDLError:
threw = True
harness.ok(threw, "Should have thrown.")