mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
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:
parent
19067366df
commit
8eed3b442b
77 changed files with 1658 additions and 793 deletions
|
@ -4,7 +4,7 @@ import WebIDL
|
|||
def WebIDLTest(parser, harness):
|
||||
parser.parse(
|
||||
"""
|
||||
[Global, Exposed=Foo] interface Foo {};
|
||||
[Global=Foo, Exposed=Foo] interface Foo {};
|
||||
[Global=(Bar, Bar1,Bar2), Exposed=Bar] interface Bar {};
|
||||
[Global=(Baz, Baz2), Exposed=Baz] interface Baz {};
|
||||
|
||||
|
@ -70,7 +70,7 @@ def WebIDLTest(parser, harness):
|
|||
parser = parser.reset()
|
||||
parser.parse(
|
||||
"""
|
||||
[Global, Exposed=Foo] interface Foo {};
|
||||
[Global=Foo, Exposed=Foo] interface Foo {};
|
||||
[Global=(Bar, Bar1, Bar2), Exposed=Bar] interface Bar {};
|
||||
[Global=(Baz, Baz2), Exposed=Baz] interface Baz {};
|
||||
|
||||
|
@ -108,7 +108,7 @@ def WebIDLTest(parser, harness):
|
|||
parser = parser.reset()
|
||||
parser.parse(
|
||||
"""
|
||||
[Global, Exposed=Foo] interface Foo {};
|
||||
[Global=Foo, Exposed=Foo] interface Foo {};
|
||||
[Global=(Bar, Bar1, Bar2), Exposed=Bar] interface Bar {};
|
||||
[Global=(Baz, Baz2), Exposed=Baz] interface Baz {};
|
||||
|
||||
|
@ -162,7 +162,7 @@ def WebIDLTest(parser, harness):
|
|||
)
|
||||
|
||||
results = parser.finish()
|
||||
except Exception as x:
|
||||
except WebIDL.WebIDLError:
|
||||
threw = True
|
||||
|
||||
harness.ok(threw, "Should have thrown on invalid Exposed value on interface.")
|
||||
|
@ -180,7 +180,7 @@ def WebIDLTest(parser, harness):
|
|||
)
|
||||
|
||||
results = parser.finish()
|
||||
except Exception as x:
|
||||
except WebIDL.WebIDLError:
|
||||
threw = True
|
||||
|
||||
harness.ok(threw, "Should have thrown on invalid Exposed value on attribute.")
|
||||
|
@ -198,7 +198,7 @@ def WebIDLTest(parser, harness):
|
|||
)
|
||||
|
||||
results = parser.finish()
|
||||
except Exception as x:
|
||||
except WebIDL.WebIDLError:
|
||||
threw = True
|
||||
|
||||
harness.ok(threw, "Should have thrown on invalid Exposed value on operation.")
|
||||
|
@ -216,7 +216,7 @@ def WebIDLTest(parser, harness):
|
|||
)
|
||||
|
||||
results = parser.finish()
|
||||
except Exception as x:
|
||||
except WebIDL.WebIDLError:
|
||||
threw = True
|
||||
|
||||
harness.ok(threw, "Should have thrown on invalid Exposed value on constant.")
|
||||
|
@ -226,8 +226,8 @@ def WebIDLTest(parser, harness):
|
|||
try:
|
||||
parser.parse(
|
||||
"""
|
||||
[Global, Exposed=Foo] interface Foo {};
|
||||
[Global, Exposed=Bar] interface Bar {};
|
||||
[Global=Foo, Exposed=Foo] interface Foo {};
|
||||
[Global=Bar, Exposed=Bar] interface Bar {};
|
||||
|
||||
[Exposed=Foo]
|
||||
interface Baz {
|
||||
|
@ -238,7 +238,7 @@ def WebIDLTest(parser, harness):
|
|||
)
|
||||
|
||||
results = parser.finish()
|
||||
except Exception as x:
|
||||
except WebIDL.WebIDLError:
|
||||
threw = True
|
||||
|
||||
harness.ok(
|
||||
|
@ -248,8 +248,8 @@ def WebIDLTest(parser, harness):
|
|||
parser = parser.reset()
|
||||
parser.parse(
|
||||
"""
|
||||
[Global, Exposed=Foo] interface Foo {};
|
||||
[Global, Exposed=Bar] interface Bar {};
|
||||
[Global=Foo, Exposed=Foo] interface Foo {};
|
||||
[Global=Bar, Exposed=Bar] interface Bar {};
|
||||
|
||||
[Exposed=Foo]
|
||||
interface Baz {
|
||||
|
@ -294,8 +294,8 @@ def WebIDLTest(parser, harness):
|
|||
parser = parser.reset()
|
||||
parser.parse(
|
||||
"""
|
||||
[Global, Exposed=Foo] interface Foo {};
|
||||
[Global, Exposed=Bar] interface Bar {};
|
||||
[Global=Foo, Exposed=Foo] interface Foo {};
|
||||
[Global=Bar, Exposed=Bar] interface Bar {};
|
||||
|
||||
[Exposed=*]
|
||||
interface Baz {
|
||||
|
@ -342,8 +342,8 @@ def WebIDLTest(parser, harness):
|
|||
try:
|
||||
parser.parse(
|
||||
"""
|
||||
[Global, Exposed=Foo] interface Foo {};
|
||||
[Global, Exposed=Bar] interface Bar {};
|
||||
[Global=Foo, Exposed=Foo] interface Foo {};
|
||||
[Global=Bar, Exposed=Bar] interface Bar {};
|
||||
|
||||
[Exposed=Foo]
|
||||
interface Baz {
|
||||
|
@ -354,7 +354,7 @@ def WebIDLTest(parser, harness):
|
|||
)
|
||||
|
||||
results = parser.finish()
|
||||
except Exception as x:
|
||||
except WebIDL.WebIDLError:
|
||||
threw = True
|
||||
|
||||
harness.ok(
|
||||
|
@ -366,8 +366,8 @@ def WebIDLTest(parser, harness):
|
|||
try:
|
||||
parser.parse(
|
||||
"""
|
||||
[Global, Exposed=Foo] interface Foo {};
|
||||
[Global, Exposed=Bar] interface Bar {};
|
||||
[Global=Foo, Exposed=Foo] interface Foo {};
|
||||
[Global=Bar, Exposed=Bar] interface Bar {};
|
||||
|
||||
[Exposed=(Foo,*)]
|
||||
interface Baz {
|
||||
|
@ -377,7 +377,7 @@ def WebIDLTest(parser, harness):
|
|||
)
|
||||
|
||||
results = parser.finish()
|
||||
except Exception as x:
|
||||
except WebIDL.WebIDLError:
|
||||
threw = True
|
||||
|
||||
harness.ok(threw, "Should have thrown on a wildcard in an identifier list.")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue