diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
commit | 40a355a42d4a9444dc753c04c6608dade2f06a23 (patch) | |
tree | 871fc667d2de662f171103ce5ec067014ef85e61 /testing/web-platform/tests/appmanifest | |
parent | Adding upstream version 124.0.1. (diff) | |
download | firefox-upstream/125.0.1.tar.xz firefox-upstream/125.0.1.zip |
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/appmanifest')
3 files changed, 48 insertions, 0 deletions
diff --git a/testing/web-platform/tests/appmanifest/display-override-member/display-override-member-media-feature-tabbed-manual.tentative.html b/testing/web-platform/tests/appmanifest/display-override-member/display-override-member-media-feature-tabbed-manual.tentative.html new file mode 100644 index 0000000000..04560071df --- /dev/null +++ b/testing/web-platform/tests/appmanifest/display-override-member/display-override-member-media-feature-tabbed-manual.tentative.html @@ -0,0 +1,36 @@ +<!DOCTYPE html> +<title>Test "tabbed" in display-override member + media feature</title> +<link rel="help" href="https://w3c.github.io/manifest#display-member" /> +<link rel="help" href="https://www.w3.org/TR/mediaqueries-5/#display-modes" /> +<link rel="help" href="https://w3c.github.io/manifest/#dom-displaymodetype-browser" /> +<link rel="manifest" href="resources/display-override-member-media-feature-tabbed.webmanifest" /> +<meta name="viewport" content="width=device-width, initial-scale=1"> +<script src="resources/display-override-member-media-feature-manual.js"></script> +<h1>Test "tabbed" in display-override member + media feature</h1> +<style> + .fail { + background-color: red; + } + + @media all and (display-mode: tabbed) { + body { + background-color: green; + } + } +</style> +<script> +const tabbed = matchMedia("(display-mode: tabbed)"); + +tabbed.onchange = () => { + if (tabbed.matches) { + document.body.classList.remove("fail"); + } +} + +if (!tabbed.matches) { + document.body.classList.add("fail"); +} +</script> +<p> + To pass, the background color must be green after installing. +</p> diff --git a/testing/web-platform/tests/appmanifest/display-override-member/resources/display-override-member-media-feature-tabbed.webmanifest b/testing/web-platform/tests/appmanifest/display-override-member/resources/display-override-member-media-feature-tabbed.webmanifest new file mode 100644 index 0000000000..b8b5fdb0f0 --- /dev/null +++ b/testing/web-platform/tests/appmanifest/display-override-member/resources/display-override-member-media-feature-tabbed.webmanifest @@ -0,0 +1,11 @@ +{ + "name": "Display override member media feature WPT", + "icons": [ + { + "src": "icon.png", + "sizes": "192x192" + } + ], + "start_url": "../display-override-member-media-feature-tabbed-manual.tentative.html", + "display_override": [ "tabbed" ] +} diff --git a/testing/web-platform/tests/appmanifest/display-override-member/resources/display-override-member-media-feature-tabbed.webmanifest.headers b/testing/web-platform/tests/appmanifest/display-override-member/resources/display-override-member-media-feature-tabbed.webmanifest.headers new file mode 100644 index 0000000000..2bab061d43 --- /dev/null +++ b/testing/web-platform/tests/appmanifest/display-override-member/resources/display-override-member-media-feature-tabbed.webmanifest.headers @@ -0,0 +1 @@ +Content-Type: application/manifest+json; charset=utf-8 |