Files
firefox/testing/web-platform/tests/fullscreen/api/element-request-fullscreen-options.tentative.https.html
Mike Wasserman 49ff80f9a0 Bug 1833770 [wpt PR 40069] - Fix WPT execution of tentative fullscreen options test, a=testonly
Automatic update from web-platform-tests
Fix WPT execution of tentative fullscreen options test

Followup after inadequate fix in http://crrev.com/c/4525083
1) Reorder script tags to fix driver context error
  "Tried to run in a non-testharness window without a call to set_test_context"
2) Move files to https for secure context requirement
  "invalid argument: feature cannot be used in insecure context"
3) Update ini to expect PASS in chrome
4) Cleanup: use assert_true and update help URL

This test now passes on a local WPT checkout with "wpt run chrome".

Bug: 1022988
Change-Id: Ib1a23f794ac8e0b7c7145fb50e362a180e6687e9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4545785
Auto-Submit: Mike Wasserman <[email protected]>
Reviewed-by: Brad Triebwasser <[email protected]>
Commit-Queue: Brad Triebwasser <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1145703}

--

wpt-commits: d60d0f9727120131aad074d8f8a6e56ef9bf97c3
wpt-pr: 40069
2023-05-25 08:22:04 +00:00

30 lines
1010 B
HTML

<!DOCTYPE html>
<title>Element#requestFullscreen({ screen }) tentative support</title>
<link rel="help" href="https://w3c.github.io/window-management/" />
<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="../trusted-click.js"></script>
<body></body>
<script>
promise_test(async (t) => {
await test_driver.set_permission(
{ name: "window-management" },
"granted"
);
let screenGetterInvoked = false;
const options = {
get screen() {
screenGetterInvoked = true;
return undefined;
},
};
await trusted_click(document.body);
await document.body.requestFullscreen(options);
assert_true(screenGetterInvoked);
}, "fullscreenOptions.screen getter is invoked on requestFullscreen");
</script>