mirror of
https://github.com/servo/servo.git
synced 2025-08-02 20:20:14 +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
27
third_party/WebIDL/tests/test_toJSON.py
vendored
27
third_party/WebIDL/tests/test_toJSON.py
vendored
|
@ -1,3 +1,6 @@
|
|||
import WebIDL
|
||||
|
||||
|
||||
def WebIDLTest(parser, harness):
|
||||
threw = False
|
||||
try:
|
||||
|
@ -8,8 +11,8 @@ def WebIDLTest(parser, harness):
|
|||
};
|
||||
"""
|
||||
)
|
||||
results = parser.finish()
|
||||
except:
|
||||
parser.finish()
|
||||
except WebIDL.WebIDLError:
|
||||
threw = True
|
||||
harness.ok(not threw, "Should allow a toJSON method.")
|
||||
|
||||
|
@ -24,8 +27,8 @@ def WebIDLTest(parser, harness):
|
|||
};
|
||||
"""
|
||||
)
|
||||
results = parser.finish()
|
||||
except:
|
||||
parser.finish()
|
||||
except WebIDL.WebIDLError:
|
||||
threw = True
|
||||
harness.ok(threw, "Should not allow overloads of a toJSON method.")
|
||||
|
||||
|
@ -39,8 +42,8 @@ def WebIDLTest(parser, harness):
|
|||
};
|
||||
"""
|
||||
)
|
||||
results = parser.finish()
|
||||
except:
|
||||
parser.finish()
|
||||
except WebIDL.WebIDLError:
|
||||
threw = True
|
||||
harness.ok(threw, "Should not allow a toJSON method with arguments.")
|
||||
|
||||
|
@ -54,8 +57,8 @@ def WebIDLTest(parser, harness):
|
|||
};
|
||||
"""
|
||||
)
|
||||
results = parser.finish()
|
||||
except:
|
||||
parser.finish()
|
||||
except WebIDL.WebIDLError:
|
||||
threw = True
|
||||
harness.ok(not threw, "Should allow a toJSON method with 'long' as return type.")
|
||||
|
||||
|
@ -69,8 +72,8 @@ def WebIDLTest(parser, harness):
|
|||
};
|
||||
"""
|
||||
)
|
||||
results = parser.finish()
|
||||
except:
|
||||
parser.finish()
|
||||
except WebIDL.WebIDLError:
|
||||
threw = True
|
||||
harness.ok(
|
||||
not threw, "Should allow a default toJSON method with 'object' as return type."
|
||||
|
@ -86,8 +89,8 @@ def WebIDLTest(parser, harness):
|
|||
};
|
||||
"""
|
||||
)
|
||||
results = parser.finish()
|
||||
except:
|
||||
parser.finish()
|
||||
except WebIDL.WebIDLError:
|
||||
threw = True
|
||||
harness.ok(
|
||||
threw,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue