summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/meta
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:43:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:43:14 +0000
commit8dd16259287f58f9273002717ec4d27e97127719 (patch)
tree3863e62a53829a84037444beab3abd4ed9dfc7d0 /testing/web-platform/tests/html/meta
parentReleasing progress-linux version 126.0.1-1~progress7.99u1. (diff)
downloadfirefox-8dd16259287f58f9273002717ec4d27e97127719.tar.xz
firefox-8dd16259287f58f9273002717ec4d27e97127719.zip
Merging upstream version 127.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/html/meta')
-rw-r--r--testing/web-platform/tests/html/meta/refresh-time.html53
-rw-r--r--testing/web-platform/tests/html/meta/resources/gotRefreshed.html3
-rw-r--r--testing/web-platform/tests/html/meta/resources/refresh.99.html5
-rw-r--r--testing/web-platform/tests/html/meta/resources/refresh1.99.html5
-rw-r--r--testing/web-platform/tests/html/meta/resources/refresh1.html5
-rw-r--r--testing/web-platform/tests/html/meta/resources/refresh1dotdot5dot.html5
6 files changed, 76 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/meta/refresh-time.html b/testing/web-platform/tests/html/meta/refresh-time.html
new file mode 100644
index 0000000000..7aef1266a2
--- /dev/null
+++ b/testing/web-platform/tests/html/meta/refresh-time.html
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>Test fractional values in meta http-equiv=refresh</title>
+<link rel="author" title="Psychpsyo" href="mailto:psychpsyo@gmail.com">
+<link rel="help" href="https://html.spec.whatwg.org/#pragma-directives">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+
+<body>
+<script>
+ async function sleep(ms, test) {
+ return new Promise(resolve => {test.step_timeout(resolve, ms)});
+ }
+
+ promise_test(async test => {
+ const frame = document.createElement("iframe");
+ document.body.appendChild(frame);
+ frame.src = "resources/refresh1.html";
+ await sleep(500, test);
+ assert_equals(frame.contentWindow.document.title, "refresh 1");
+ await sleep(1000, test);
+ assert_equals(frame.contentWindow.document.title, "got refreshed");
+ }, "Ensure that refresh is observed");
+
+ promise_test(async test => {
+ const frame = document.createElement("iframe");
+ document.body.appendChild(frame);
+ frame.src = "resources/refresh.99.html";
+ await sleep(500, test);
+ assert_equals(frame.contentWindow.document.title, "got refreshed");
+ }, "Ensure that fractions in refresh time are ignored");
+
+ promise_test(async test => {
+ const frame = document.createElement("iframe");
+ document.body.appendChild(frame);
+ frame.src = "resources/refresh1.99.html";
+ await sleep(500, test);
+ assert_equals(frame.contentWindow.document.title, "refresh 1.99");
+ await sleep(1000, test);
+ assert_equals(frame.contentWindow.document.title, "got refreshed");
+ }, "Ensure that non-fractional part in refresh time does not get discarded");
+
+ promise_test(async test => {
+ const frame = document.createElement("iframe");
+ document.body.appendChild(frame);
+ frame.src = "resources/refresh1dotdot5dot.html";
+ await sleep(500, test);
+ assert_equals(frame.contentWindow.document.title, "refresh 1..5.");
+ await sleep(750, test);
+ assert_equals(frame.contentWindow.document.title, "got refreshed");
+ }, "Ensure that multiple periods in refresh time just get ignored");
+</script>
+</body> \ No newline at end of file
diff --git a/testing/web-platform/tests/html/meta/resources/gotRefreshed.html b/testing/web-platform/tests/html/meta/resources/gotRefreshed.html
new file mode 100644
index 0000000000..c894269593
--- /dev/null
+++ b/testing/web-platform/tests/html/meta/resources/gotRefreshed.html
@@ -0,0 +1,3 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>got refreshed</title> \ No newline at end of file
diff --git a/testing/web-platform/tests/html/meta/resources/refresh.99.html b/testing/web-platform/tests/html/meta/resources/refresh.99.html
new file mode 100644
index 0000000000..ca4e346277
--- /dev/null
+++ b/testing/web-platform/tests/html/meta/resources/refresh.99.html
@@ -0,0 +1,5 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>refresh .99</title>
+
+<meta http-equiv="refresh" content=".99;url=gotRefreshed.html"> \ No newline at end of file
diff --git a/testing/web-platform/tests/html/meta/resources/refresh1.99.html b/testing/web-platform/tests/html/meta/resources/refresh1.99.html
new file mode 100644
index 0000000000..76121cfd40
--- /dev/null
+++ b/testing/web-platform/tests/html/meta/resources/refresh1.99.html
@@ -0,0 +1,5 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>refresh 1.99</title>
+
+<meta http-equiv="refresh" content="1.99;url=gotRefreshed.html"> \ No newline at end of file
diff --git a/testing/web-platform/tests/html/meta/resources/refresh1.html b/testing/web-platform/tests/html/meta/resources/refresh1.html
new file mode 100644
index 0000000000..14819dc3db
--- /dev/null
+++ b/testing/web-platform/tests/html/meta/resources/refresh1.html
@@ -0,0 +1,5 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>refresh 1</title>
+
+<meta http-equiv="refresh" content="1;url=gotRefreshed.html"> \ No newline at end of file
diff --git a/testing/web-platform/tests/html/meta/resources/refresh1dotdot5dot.html b/testing/web-platform/tests/html/meta/resources/refresh1dotdot5dot.html
new file mode 100644
index 0000000000..085b9e9ba7
--- /dev/null
+++ b/testing/web-platform/tests/html/meta/resources/refresh1dotdot5dot.html
@@ -0,0 +1,5 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>refresh 1..5.</title>
+
+<meta http-equiv="refresh" content="1..5.;url=gotRefreshed.html"> \ No newline at end of file