mirror of
https://github.com/servo/servo.git
synced 2025-07-16 20:03:39 +01:00
22 lines
778 B
HTML
22 lines
778 B
HTML
<!DOCTYPE html>
|
|
<script src="/resources/testharness.js"></script>
|
|
<script src="/resources/testharnessreport.js"></script>
|
|
<script>
|
|
promise_test(async t => {
|
|
let waitForMessage = new Promise((resolve, reject) => {
|
|
window.onmessage = e => resolve(e.data);
|
|
});
|
|
window.open("resources/portal-activate-twice-window-1.html");
|
|
let error = await waitForMessage;
|
|
assert_equals(error, "InvalidStateError");
|
|
}, "Calling activate when a portal is already activating should fail");
|
|
|
|
promise_test(async t => {
|
|
let waitForMessage = new Promise((resolve, reject) => {
|
|
window.onmessage = e => resolve(e.data);
|
|
});
|
|
window.open("resources/portal-activate-twice-window-2.html");
|
|
let error = await waitForMessage;
|
|
assert_equals(error, "InvalidStateError");
|
|
});
|
|
</script>
|