mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Update web-platform-tests to revision e3cf1284464a4a3e46fd15e4138f8e32c6cecdd8
This commit is contained in:
parent
b20333a324
commit
c5c325d8bb
57 changed files with 1422 additions and 493 deletions
|
@ -0,0 +1,23 @@
|
|||
const barProps = ["locationbar", "menubar", "personalbar", "scrollbars", "statusbar", "toolbar"];
|
||||
|
||||
test(() => {
|
||||
for(const prop of barProps) {
|
||||
assert_true(window[prop].visible);
|
||||
}
|
||||
}, "All bars visible");
|
||||
|
||||
["noopener", "noreferrer"].forEach(openerStyle => {
|
||||
async_test(t => {
|
||||
const channelName = "5454" + openerStyle + "34324";
|
||||
const channel = new BroadcastChannel(channelName);
|
||||
window.open("support/BarProp-target.html?" + channelName, "", openerStyle);
|
||||
channel.onmessage = t.step_func_done(e => {
|
||||
// Send message first so if asserts throw the popup is still closed
|
||||
channel.postMessage(null);
|
||||
|
||||
for(const prop of barProps) {
|
||||
assert_true(e.data[prop]);
|
||||
}
|
||||
});
|
||||
}, `window.open() with ${openerStyle} should have all bars visible`);
|
||||
});
|
|
@ -0,0 +1,17 @@
|
|||
<!DOCTYPE html>
|
||||
<script>
|
||||
const barProps = ["locationbar", "menubar", "personalbar", "scrollbars", "statusbar", "toolbar"];
|
||||
const barPropsObj = {};
|
||||
const channelName = location.search.substr(1);
|
||||
const channel = new BroadcastChannel(channelName);
|
||||
for (const prop of barProps) {
|
||||
barPropsObj[prop] = window[prop].visible;
|
||||
}
|
||||
channel.postMessage(barPropsObj);
|
||||
|
||||
// Because messages are not delivered synchronously and because closing a
|
||||
// browsing context prompts the eventual clearing of all task sources, this
|
||||
// document should not be closed until the opener document has confirmed
|
||||
// receipt.
|
||||
channel.onmessage = () => { window.close() };
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue