Files
tubestation/testing/web-platform/tests/window-management/multi-screen-window-open.tentative.https.html
Mike Wasserman 2c6ea4717e Bug 1838345 [wpt PR 40534] - Move and rename window-management wpts, enable automation, a=testonly
Automatic update from web-platform-tests
Move and rename window-management wpts, enable automation

Rename dir and update meta url for `window-management` spec name.
Rename files for clarity, brevity, consistency.

Remove '-manual' from filenames, to trigger automated runs and support:
  ./wpt run chrome window-management/*
(results should surface on https://wpt.fyi/results/window-management)

Bug: 1022988, 1338645, 1453772
Change-Id: I16887de7c245561afff73c2dfb17e3ad32f5f74a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4611945
Auto-Submit: Mike Wasserman <msw@chromium.org>
Reviewed-by: Brad Triebwasser <btriebw@chromium.org>
Quick-Run: Mike Wasserman <msw@chromium.org>
Commit-Queue: Brad Triebwasser <btriebw@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1157299}

--

wpt-commits: dde4c3a9c98583b7b6ab260ffaf8f8a00debbac3
wpt-pr: 40534
2023-06-21 14:34:55 +00:00

40 lines
1.5 KiB
HTML

<!DOCTYPE html>
<meta name="timeout" content="long">
<!-- user agents are not required to support open features other than `noopener`
and on some platforms position and size features don't make sense -->
<meta name="flags" content="may">
<title>Window Management test: target-screen window.open()</title>
<link rel="help" href="https://w3c.github.io/window-management/">
Tests use of multi-screen details to open a popup window on each screen.<br>
The host device must have 2+ screens to yield meaningful results.<br><br>
<button id="closeButton" onclick="closePopups">Close popups</button><br>
<input id="autoClose" type="checkbox" checked=true>Auto-close popups</input>
<ul id="list"></ul>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<script src="resources/helpers.js"></script>
<script>
'use strict';
let popups = [];
function closePopups() {
popups.forEach(p => p.close());
popups = [];
}
promise_test(async setUpTest => {
await setUpWindowManagement(setUpTest);
for (const s of window.screenDetails.screens) {
const name = `Open a popup on '${s.label}'`;
await promise_test(async test => {
await buttonClick(test, name);
popups.push(await openPopupOnScreen(s));
if (autoClose.checked)
closePopups();
}, name);
}
}, 'Use multi-screen details to open a popup window on each screen');
</script>