summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/appmanifest
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:27 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:27 +0000
commit40a355a42d4a9444dc753c04c6608dade2f06a23 (patch)
tree871fc667d2de662f171103ce5ec067014ef85e61 /testing/web-platform/tests/appmanifest
parentAdding upstream version 124.0.1. (diff)
downloadfirefox-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')
-rw-r--r--testing/web-platform/tests/appmanifest/display-override-member/display-override-member-media-feature-tabbed-manual.tentative.html36
-rw-r--r--testing/web-platform/tests/appmanifest/display-override-member/resources/display-override-member-media-feature-tabbed.webmanifest11
-rw-r--r--testing/web-platform/tests/appmanifest/display-override-member/resources/display-override-member-media-feature-tabbed.webmanifest.headers1
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