aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bindings/codegen/parser/tests/test_interface.py
diff options
context:
space:
mode:
authorKagami Sascha Rosylight <saschanaz@outlook.com>2019-10-02 18:21:34 +0900
committerKagami Sascha Rosylight <saschanaz@outlook.com>2019-10-03 14:25:23 +0900
commit2660f359254e7543b7c91d14728b44ac01e438e5 (patch)
tree3a46481fc1bbe22994df7186ce10d5ea6a4ec015 /components/script/dom/bindings/codegen/parser/tests/test_interface.py
parent84693d81173b58c4afc408a7295210960842484a (diff)
downloadservo-2660f359254e7543b7c91d14728b44ac01e438e5.tar.gz
servo-2660f359254e7543b7c91d14728b44ac01e438e5.zip
Remove [PrimaryGlobal]
Diffstat (limited to 'components/script/dom/bindings/codegen/parser/tests/test_interface.py')
-rw-r--r--components/script/dom/bindings/codegen/parser/tests/test_interface.py104
1 files changed, 6 insertions, 98 deletions
diff --git a/components/script/dom/bindings/codegen/parser/tests/test_interface.py b/components/script/dom/bindings/codegen/parser/tests/test_interface.py
index 28e6af94597..47db3ae4cc9 100644
--- a/components/script/dom/bindings/codegen/parser/tests/test_interface.py
+++ b/components/script/dom/bindings/codegen/parser/tests/test_interface.py
@@ -84,100 +84,6 @@ def WebIDLTest(parser, harness):
threw = False
try:
parser.parse("""
- interface A {};
- interface B {};
- A implements B;
- B implements A;
- """)
- results = parser.finish()
- except:
- threw = True
-
- harness.ok(threw, "Should not allow cycles via implements")
-
- parser = parser.reset()
- threw = False
- try:
- parser.parse("""
- interface A {};
- interface C {};
- interface B {};
- A implements C;
- C implements B;
- B implements A;
- """)
- results = parser.finish()
- except:
- threw = True
-
- harness.ok(threw, "Should not allow indirect cycles via implements")
-
- parser = parser.reset()
- threw = False
- try:
- parser.parse("""
- interface A : B {};
- interface B {};
- B implements A;
- """)
- results = parser.finish()
- except:
- threw = True
-
- harness.ok(threw, "Should not allow inheriting from an interface that implements us")
-
- parser = parser.reset()
- threw = False
- try:
- parser.parse("""
- interface A : B {};
- interface B {};
- interface C {};
- B implements C;
- C implements A;
- """)
- results = parser.finish()
- except:
- threw = True
-
- harness.ok(threw, "Should not allow inheriting from an interface that indirectly implements us")
-
- parser = parser.reset()
- threw = False
- try:
- parser.parse("""
- interface A : B {};
- interface B : C {};
- interface C {};
- C implements A;
- """)
- results = parser.finish()
- except:
- threw = True
-
- harness.ok(threw, "Should not allow indirectly inheriting from an interface that implements us")
-
- parser = parser.reset()
- threw = False
- try:
- parser.parse("""
- interface A : B {};
- interface B : C {};
- interface C {};
- interface D {};
- C implements D;
- D implements A;
- """)
- results = parser.finish()
- except:
- threw = True
-
- harness.ok(threw, "Should not allow indirectly inheriting from an interface that indirectly implements us")
-
- parser = parser.reset()
- threw = False
- try:
- parser.parse("""
interface A;
interface B : A {};
""")
@@ -377,7 +283,7 @@ def WebIDLTest(parser, harness):
parser = parser.reset()
parser.parse("""
- [Global] interface Window {};
+ [Global, Exposed=Window] interface Window {};
[Exposed=Window, LegacyWindowAlias=A]
interface B {};
[Exposed=Window, LegacyWindowAlias=(C, D)]
@@ -419,7 +325,8 @@ def WebIDLTest(parser, harness):
threw = False
try:
parser.parse("""
- [Global] interface Window {};
+ [Global, Exposed=Window] interface Window {};
+ [Exposed=Window]
interface A {};
[Exposed=Window, LegacyWindowAlias=A]
interface B {};
@@ -434,9 +341,10 @@ def WebIDLTest(parser, harness):
threw = False
try:
parser.parse("""
- [Global] interface Window {};
+ [Global, Exposed=Window] interface Window {};
[Exposed=Window, LegacyWindowAlias=A]
interface B {};
+ [Exposed=Window]
interface A {};
""")
results = parser.finish()
@@ -449,7 +357,7 @@ def WebIDLTest(parser, harness):
threw = False
try:
parser.parse("""
- [Global] interface Window {};
+ [Global, Exposed=Window] interface Window {};
[Exposed=Window, LegacyWindowAlias=A]
interface B {};
[Exposed=Window, LegacyWindowAlias=A]