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