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
45
third_party/WebIDL/tests/test_promise.py
vendored
45
third_party/WebIDL/tests/test_promise.py
vendored
|
@ -1,3 +1,6 @@
|
|||
import WebIDL
|
||||
|
||||
|
||||
def WebIDLTest(parser, harness):
|
||||
threw = False
|
||||
try:
|
||||
|
@ -8,9 +11,9 @@ def WebIDLTest(parser, harness):
|
|||
};
|
||||
"""
|
||||
)
|
||||
results = parser.finish()
|
||||
parser.finish()
|
||||
|
||||
except:
|
||||
except WebIDL.WebIDLError:
|
||||
threw = True
|
||||
harness.ok(threw, "Should not allow Promise return values for legacycaller.")
|
||||
|
||||
|
@ -25,8 +28,8 @@ def WebIDLTest(parser, harness):
|
|||
};
|
||||
"""
|
||||
)
|
||||
results = parser.finish()
|
||||
except:
|
||||
parser.finish()
|
||||
except WebIDL.WebIDLError:
|
||||
threw = True
|
||||
harness.ok(
|
||||
threw,
|
||||
|
@ -45,8 +48,8 @@ def WebIDLTest(parser, harness):
|
|||
};
|
||||
"""
|
||||
)
|
||||
results = parser.finish()
|
||||
except:
|
||||
parser.finish()
|
||||
except WebIDL.WebIDLError:
|
||||
threw = True
|
||||
harness.ok(
|
||||
threw,
|
||||
|
@ -64,8 +67,8 @@ def WebIDLTest(parser, harness):
|
|||
};
|
||||
"""
|
||||
)
|
||||
results = parser.finish()
|
||||
except:
|
||||
parser.finish()
|
||||
except WebIDL.WebIDLError:
|
||||
threw = True
|
||||
harness.ok(threw, "Should not allow nullable Promise return values.")
|
||||
|
||||
|
@ -79,8 +82,8 @@ def WebIDLTest(parser, harness):
|
|||
};
|
||||
"""
|
||||
)
|
||||
results = parser.finish()
|
||||
except:
|
||||
parser.finish()
|
||||
except WebIDL.WebIDLError:
|
||||
threw = True
|
||||
harness.ok(threw, "Should not allow nullable Promise arguments.")
|
||||
|
||||
|
@ -93,7 +96,7 @@ def WebIDLTest(parser, harness):
|
|||
};
|
||||
"""
|
||||
)
|
||||
results = parser.finish()
|
||||
parser.finish()
|
||||
|
||||
harness.ok(
|
||||
True, "Should allow overloads which only have Promise and return " "types."
|
||||
|
@ -109,8 +112,8 @@ def WebIDLTest(parser, harness):
|
|||
};
|
||||
"""
|
||||
)
|
||||
results = parser.finish()
|
||||
except:
|
||||
parser.finish()
|
||||
except WebIDL.WebIDLError:
|
||||
threw = True
|
||||
harness.ok(threw, "Should not allow writable Promise-typed attributes.")
|
||||
|
||||
|
@ -124,8 +127,8 @@ def WebIDLTest(parser, harness):
|
|||
};
|
||||
"""
|
||||
)
|
||||
results = parser.finish()
|
||||
except:
|
||||
parser.finish()
|
||||
except WebIDL.WebIDLError:
|
||||
threw = True
|
||||
harness.ok(
|
||||
threw, "Should not allow [LegacyLenientSetter] Promise-typed attributes."
|
||||
|
@ -141,8 +144,8 @@ def WebIDLTest(parser, harness):
|
|||
};
|
||||
"""
|
||||
)
|
||||
results = parser.finish()
|
||||
except:
|
||||
parser.finish()
|
||||
except WebIDL.WebIDLError:
|
||||
threw = True
|
||||
harness.ok(threw, "Should not allow [PutForwards] Promise-typed attributes.")
|
||||
|
||||
|
@ -156,8 +159,8 @@ def WebIDLTest(parser, harness):
|
|||
};
|
||||
"""
|
||||
)
|
||||
results = parser.finish()
|
||||
except:
|
||||
parser.finish()
|
||||
except WebIDL.WebIDLError:
|
||||
threw = True
|
||||
harness.ok(threw, "Should not allow [Replaceable] Promise-typed attributes.")
|
||||
|
||||
|
@ -171,7 +174,7 @@ def WebIDLTest(parser, harness):
|
|||
};
|
||||
"""
|
||||
)
|
||||
results = parser.finish()
|
||||
except:
|
||||
parser.finish()
|
||||
except WebIDL.WebIDLError:
|
||||
threw = True
|
||||
harness.ok(threw, "Should not allow [SameObject] Promise-typed attributes.")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue