summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/mozilla/tests/infrastructure
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:22:09 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:22:09 +0000
commit43a97878ce14b72f0981164f87f2e35e14151312 (patch)
tree620249daf56c0258faa40cbdcf9cfba06de2a846 /testing/web-platform/mozilla/tests/infrastructure
parentInitial commit. (diff)
downloadfirefox-43a97878ce14b72f0981164f87f2e35e14151312.tar.xz
firefox-43a97878ce14b72f0981164f87f2e35e14151312.zip
Adding upstream version 110.0.1.upstream/110.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/mozilla/tests/infrastructure')
-rw-r--r--testing/web-platform/mozilla/tests/infrastructure/prefs/prefs-0.html12
-rw-r--r--testing/web-platform/mozilla/tests/infrastructure/prefs/prefs-1.html11
-rw-r--r--testing/web-platform/mozilla/tests/infrastructure/prefs/prefs-2.html10
-rw-r--r--testing/web-platform/mozilla/tests/infrastructure/prefs/prefs-false.html5
-rw-r--r--testing/web-platform/mozilla/tests/infrastructure/prefs/prefs-true.html5
-rw-r--r--testing/web-platform/mozilla/tests/infrastructure/specialPowers/specialpowers.html7
6 files changed, 50 insertions, 0 deletions
diff --git a/testing/web-platform/mozilla/tests/infrastructure/prefs/prefs-0.html b/testing/web-platform/mozilla/tests/infrastructure/prefs/prefs-0.html
new file mode 100644
index 0000000000..584620392c
--- /dev/null
+++ b/testing/web-platform/mozilla/tests/infrastructure/prefs/prefs-0.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<meta charset="utf-8">
+<link rel="match" href="prefs-false.html"/>
+<div id="result"></div>
+<script>
+// This can be any pref, as long as it doesn't affect the test and the default value is false
+// If it's updated here prefs-1.html and prefs-2.html need the same update
+result.innerHTML = SpecialPowers.getBoolPref("apz.allow_zooming_out");
+document.documentElement.classList.remove("reftest-wait");
+</script>
+</html>
diff --git a/testing/web-platform/mozilla/tests/infrastructure/prefs/prefs-1.html b/testing/web-platform/mozilla/tests/infrastructure/prefs/prefs-1.html
new file mode 100644
index 0000000000..8f1029d3ff
--- /dev/null
+++ b/testing/web-platform/mozilla/tests/infrastructure/prefs/prefs-1.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<meta charset="utf-8">
+<link rel="match" href="prefs-true.html"/>
+<div id="result"></div>
+<script>
+// If the pref is changed here, it needs to also be changed in the corresponding ini file
+result.innerHTML = SpecialPowers.getBoolPref("apz.allow_zooming_out");
+document.documentElement.classList.remove("reftest-wait");
+</script>
+</html>
diff --git a/testing/web-platform/mozilla/tests/infrastructure/prefs/prefs-2.html b/testing/web-platform/mozilla/tests/infrastructure/prefs/prefs-2.html
new file mode 100644
index 0000000000..54ebde2ebe
--- /dev/null
+++ b/testing/web-platform/mozilla/tests/infrastructure/prefs/prefs-2.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<meta charset="utf-8">
+<link rel="match" href="prefs-false.html"/>
+<div id="result"></div>
+<script>
+result.innerHTML = SpecialPowers.getBoolPref("apz.allow_zooming_out");
+document.documentElement.classList.remove("reftest-wait");
+</script>
+</html>
diff --git a/testing/web-platform/mozilla/tests/infrastructure/prefs/prefs-false.html b/testing/web-platform/mozilla/tests/infrastructure/prefs/prefs-false.html
new file mode 100644
index 0000000000..667d1e1bf6
--- /dev/null
+++ b/testing/web-platform/mozilla/tests/infrastructure/prefs/prefs-false.html
@@ -0,0 +1,5 @@
+<!DOCTYPE html>
+<html>
+<meta charset="utf-8">
+<div id="result">false</div>
+</html>
diff --git a/testing/web-platform/mozilla/tests/infrastructure/prefs/prefs-true.html b/testing/web-platform/mozilla/tests/infrastructure/prefs/prefs-true.html
new file mode 100644
index 0000000000..df3fe20eff
--- /dev/null
+++ b/testing/web-platform/mozilla/tests/infrastructure/prefs/prefs-true.html
@@ -0,0 +1,5 @@
+<!DOCTYPE html>
+<html>
+<meta charset="utf-8">
+<div id="result">true</div>
+</html>
diff --git a/testing/web-platform/mozilla/tests/infrastructure/specialPowers/specialpowers.html b/testing/web-platform/mozilla/tests/infrastructure/specialPowers/specialpowers.html
new file mode 100644
index 0000000000..38615028d2
--- /dev/null
+++ b/testing/web-platform/mozilla/tests/infrastructure/specialPowers/specialpowers.html
@@ -0,0 +1,7 @@
+<title>Check specialPowers is available in gecko-only tests</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+
+<script>
+test(() => assert_equals(SpecialPowers.sanityCheck(), "foo"))
+</script>