mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Create a top-level "third_party" directory
This directory now contains third_party software that is vendored into the Servo source tree. The idea is that it would eventually hold webrender and other crates from mozilla-central as well with a standard patch management approach for each.
This commit is contained in:
parent
7412e28349
commit
8be014ee46
148 changed files with 10 additions and 7 deletions
129
third_party/WebIDL/tests/test_global_extended_attr.py
vendored
Normal file
129
third_party/WebIDL/tests/test_global_extended_attr.py
vendored
Normal file
|
@ -0,0 +1,129 @@
|
|||
def WebIDLTest(parser, harness):
|
||||
parser.parse(
|
||||
"""
|
||||
[Global, Exposed=Foo]
|
||||
interface Foo : Bar {
|
||||
getter any(DOMString name);
|
||||
};
|
||||
[Exposed=Foo]
|
||||
interface Bar {};
|
||||
"""
|
||||
)
|
||||
|
||||
results = parser.finish()
|
||||
|
||||
harness.ok(
|
||||
results[0].isOnGlobalProtoChain(),
|
||||
"[Global] interface should be on global's proto chain",
|
||||
)
|
||||
harness.ok(
|
||||
results[1].isOnGlobalProtoChain(),
|
||||
"[Global] interface should be on global's proto chain",
|
||||
)
|
||||
|
||||
parser = parser.reset()
|
||||
threw = False
|
||||
try:
|
||||
parser.parse(
|
||||
"""
|
||||
[Global, Exposed=Foo]
|
||||
interface Foo {
|
||||
getter any(DOMString name);
|
||||
setter undefined(DOMString name, any arg);
|
||||
};
|
||||
"""
|
||||
)
|
||||
results = parser.finish()
|
||||
except:
|
||||
threw = True
|
||||
|
||||
harness.ok(
|
||||
threw,
|
||||
"Should have thrown for [Global] used on an interface with a " "named setter",
|
||||
)
|
||||
|
||||
parser = parser.reset()
|
||||
threw = False
|
||||
try:
|
||||
parser.parse(
|
||||
"""
|
||||
[Global, Exposed=Foo]
|
||||
interface Foo {
|
||||
getter any(DOMString name);
|
||||
deleter undefined(DOMString name);
|
||||
};
|
||||
"""
|
||||
)
|
||||
results = parser.finish()
|
||||
except:
|
||||
threw = True
|
||||
|
||||
harness.ok(
|
||||
threw,
|
||||
"Should have thrown for [Global] used on an interface with a " "named deleter",
|
||||
)
|
||||
|
||||
parser = parser.reset()
|
||||
threw = False
|
||||
try:
|
||||
parser.parse(
|
||||
"""
|
||||
[Global, LegacyOverrideBuiltIns, Exposed=Foo]
|
||||
interface Foo {
|
||||
};
|
||||
"""
|
||||
)
|
||||
results = parser.finish()
|
||||
except:
|
||||
threw = True
|
||||
|
||||
harness.ok(
|
||||
threw,
|
||||
"Should have thrown for [Global] used on an interface with a "
|
||||
"[LegacyOverrideBuiltIns]",
|
||||
)
|
||||
|
||||
parser = parser.reset()
|
||||
threw = False
|
||||
try:
|
||||
parser.parse(
|
||||
"""
|
||||
[Global, Exposed=Foo]
|
||||
interface Foo : Bar {
|
||||
};
|
||||
[LegacyOverrideBuiltIns, Exposed=Foo]
|
||||
interface Bar {
|
||||
};
|
||||
"""
|
||||
)
|
||||
results = parser.finish()
|
||||
except:
|
||||
threw = True
|
||||
|
||||
harness.ok(
|
||||
threw,
|
||||
"Should have thrown for [Global] used on an interface with an "
|
||||
"[LegacyOverrideBuiltIns] ancestor",
|
||||
)
|
||||
|
||||
parser = parser.reset()
|
||||
threw = False
|
||||
try:
|
||||
parser.parse(
|
||||
"""
|
||||
[Global, Exposed=Foo]
|
||||
interface Foo {
|
||||
};
|
||||
[Exposed=Foo]
|
||||
interface Bar : Foo {
|
||||
};
|
||||
"""
|
||||
)
|
||||
results = parser.finish()
|
||||
except:
|
||||
threw = True
|
||||
|
||||
harness.ok(
|
||||
threw,
|
||||
"Should have thrown for [Global] used on an interface with a " "descendant",
|
||||
)
|
Loading…
Add table
Add a link
Reference in a new issue