mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-27 10:07:15 +02:00
Tests/LibWeb: Import Fullscreen WPT tests
This commit is contained in:
Notes:
github-actions[bot]
2026-02-23 18:45:39 +00:00
Author: https://github.com/Lubrsi Commit: https://github.com/LadybirdBrowser/ladybird/commit/8017f8a7ed3 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/7649 Reviewed-by: https://github.com/shannonbooth ✅ Reviewed-by: https://github.com/tcl3
@@ -0,0 +1,28 @@
|
||||
<!DOCTYPE html>
|
||||
<title>Element#requestFullscreen({ navigationUI }) support</title>
|
||||
<script src="../../resources/testharness.js"></script>
|
||||
<script src="../../resources/testharnessreport.js"></script>
|
||||
<body></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(async (t) => {
|
||||
const invalidDict = {
|
||||
get navigationUI() {
|
||||
return "invalid-value";
|
||||
},
|
||||
};
|
||||
await promise_rejects_js(
|
||||
t,
|
||||
TypeError,
|
||||
document.body.requestFullscreen(invalidDict)
|
||||
);
|
||||
await promise_rejects_js(
|
||||
t,
|
||||
TypeError,
|
||||
document.body.requestFullscreen({ navigationUI: "other-invalid-value" })
|
||||
);
|
||||
}, "requestFullscreen() with invalid navigationUI values");
|
||||
</script>
|
||||
Reference in New Issue
Block a user