mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-11-09 21:00:42 +02:00
Automatic update from web-platform-tests Fix fullscreen-options wpt test The test failed because a promise was uncaught. Ensure that either a rejected or allowed promise will allow the test to pass provided Change-Id: I604ab23fe32a1dee1ed60182dd25e4ffbd60a688 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1548032 Reviewed-by: Robert Ma <robertma@chromium.org> Commit-Queue: Dave Tapuska <dtapuska@chromium.org> Cr-Commit-Position: refs/heads/master@{#646438} -- wpt-commits: 691cf75b7818a699b58c0d5ce94e5f7b21841193 wpt-pr: 16189
21 lines
863 B
HTML
21 lines
863 B
HTML
<!DOCTYPE html>
|
|
<title>Element#requestFullscreen({ navigationUI }) support</title>
|
|
<script src="/resources/testharness.js"></script>
|
|
<script src="/resources/testharnessreport.js"></script>
|
|
<body>
|
|
<script>
|
|
// Tests for https://github.com/whatwg/fullscreen/pull/129. Because there are
|
|
// no normative requirements on what navigationUI should do, just test for
|
|
// basic support. (One could also check that the three allowed enum valid are
|
|
// supported and no others, but that would overlap with UA-specific tests.)
|
|
promise_test(() => {
|
|
let invoked = false;
|
|
return document.body.requestFullscreen({
|
|
get navigationUI() { invoked = true; return "irrelevant-value"; }
|
|
}).then(() => {
|
|
assert_unreached("promise should be rejected due to invalid navigationUI value");
|
|
}, () => {
|
|
assert_true(invoked, "navigationUI getter invoked");
|
|
});
|
|
});
|
|
</script>
|