summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/mozilla/tests/infrastructure
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
commit26a029d407be480d791972afb5975cf62c9360a6 (patch)
treef435a8308119effd964b339f76abb83a57c29483 /testing/web-platform/mozilla/tests/infrastructure
parentInitial commit. (diff)
downloadfirefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz
firefox-26a029d407be480d791972afb5975cf62c9360a6.zip
Adding upstream version 124.0.1.upstream/124.0.1
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>