From 26a029d407be480d791972afb5975cf62c9360a6 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 02:47:55 +0200 Subject: Adding upstream version 124.0.1. Signed-off-by: Daniel Baumann --- .../document-close-with-pending-script.html | 67 ++++++++++++++++++++++ .../document.close-01.xhtml | 19 ++++++ ...event-after-location-set-during-write.window.js | 19 ++++++ 3 files changed, 105 insertions(+) create mode 100644 testing/web-platform/tests/html/webappapis/dynamic-markup-insertion/closing-the-input-stream/document-close-with-pending-script.html create mode 100644 testing/web-platform/tests/html/webappapis/dynamic-markup-insertion/closing-the-input-stream/document.close-01.xhtml create mode 100644 testing/web-platform/tests/html/webappapis/dynamic-markup-insertion/closing-the-input-stream/load-event-after-location-set-during-write.window.js (limited to 'testing/web-platform/tests/html/webappapis/dynamic-markup-insertion/closing-the-input-stream') diff --git a/testing/web-platform/tests/html/webappapis/dynamic-markup-insertion/closing-the-input-stream/document-close-with-pending-script.html b/testing/web-platform/tests/html/webappapis/dynamic-markup-insertion/closing-the-input-stream/document-close-with-pending-script.html new file mode 100644 index 0000000000..1584ca5f97 --- /dev/null +++ b/testing/web-platform/tests/html/webappapis/dynamic-markup-insertion/closing-the-input-stream/document-close-with-pending-script.html @@ -0,0 +1,67 @@ + + +document.close called while a script is pending + + + + + diff --git a/testing/web-platform/tests/html/webappapis/dynamic-markup-insertion/closing-the-input-stream/document.close-01.xhtml b/testing/web-platform/tests/html/webappapis/dynamic-markup-insertion/closing-the-input-stream/document.close-01.xhtml new file mode 100644 index 0000000000..164d71d191 --- /dev/null +++ b/testing/web-platform/tests/html/webappapis/dynamic-markup-insertion/closing-the-input-stream/document.close-01.xhtml @@ -0,0 +1,19 @@ + + +document.close in XHTML + + + + + + +
+ + + diff --git a/testing/web-platform/tests/html/webappapis/dynamic-markup-insertion/closing-the-input-stream/load-event-after-location-set-during-write.window.js b/testing/web-platform/tests/html/webappapis/dynamic-markup-insertion/closing-the-input-stream/load-event-after-location-set-during-write.window.js new file mode 100644 index 0000000000..d5c8469baf --- /dev/null +++ b/testing/web-platform/tests/html/webappapis/dynamic-markup-insertion/closing-the-input-stream/load-event-after-location-set-during-write.window.js @@ -0,0 +1,19 @@ +// Make sure that the load event for an iframe doesn't fire at the +// point when a navigation triggered by document.write() starts in it, +// but rather when that navigation completes. + +async_test(t => { + const frame = document.body.appendChild(document.createElement("iframe")); + const doc = frame.contentDocument; + const url = URL.createObjectURL(new Blob(["PASS"], { type: "text/html"})); + + frame.onload = t.step_func_done(() => { + assert_equals(frame.contentDocument.body.textContent, "PASS", + "Why is our load event firing before the new document loaded?"); + }); + + doc.open(); + doc.write(`FAIL