mirror of
https://github.com/servo/servo.git
synced 2025-09-11 15:38:24 +01:00
Update web-platform-tests to revision fd0429f0b45f975b25d85256dac33762134952c5
This commit is contained in:
parent
0ba7da4431
commit
c8202ddbe1
50 changed files with 1210 additions and 191 deletions
|
@ -0,0 +1,25 @@
|
|||
<!DOCTYPE html>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script>
|
||||
test(() => {
|
||||
// Even though UA-generated portalactivate events are different, the
|
||||
// properties supplied should be used.
|
||||
const e = new PortalActivateEvent("eventtype", { bubbles: true, cancelable: true });
|
||||
assert_equals(e.type, "eventtype");
|
||||
assert_true(e.bubbles);
|
||||
assert_true(e.cancelable);
|
||||
assert_equals(null, e.data);
|
||||
}, "It should be possible to construct a PortalActivateEvent with a dictionary");
|
||||
|
||||
test(() => {
|
||||
const data = {};
|
||||
const e = new PortalActivateEvent("portalactivate", { data });
|
||||
assert_equals(data, e.data);
|
||||
}, "A PortalActivateEvent should expose exactly the data object supplied in the original realm");
|
||||
|
||||
test(() => {
|
||||
const e = new PortalActivateEvent("portalactivate");
|
||||
assert_throws("InvalidStateError", () => e.adoptPredecessor());
|
||||
}, "Invoking adoptPredecessor on a synthetic PortalActivateEvent should throw");
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue