Update web-platform-tests to revision e3cf1284464a4a3e46fd15e4138f8e32c6cecdd8

This commit is contained in:
WPT Sync Bot 2019-04-18 21:48:35 -04:00
parent b20333a324
commit c5c325d8bb
57 changed files with 1422 additions and 493 deletions

View file

@ -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`);
});

View file

@ -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>