diff --git a/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/tasks.window.js b/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/tasks.window.js
index 5c1b567f50b786..15c8010b42872f 100644
--- a/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/tasks.window.js
+++ b/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/tasks.window.js
@@ -10,6 +10,7 @@
// second actually calls document.open() to test if the method call removes
// that specific task from the queue.
+// This is necessary to allow the promise rejection test below.
setup({
allow_uncaught_exception: true
});
@@ -17,15 +18,17 @@ setup({
function taskTest(description, testBody) {
async_test(t => {
const frame = document.body.appendChild(document.createElement("iframe"));
- // The empty HTML seems to be necessary to cajole Chrome into firing a load
- // event, which is necessary to make sure the frame's document doesn't have
- // a parser associated with it.
+ // The empty HTML seems to be necessary to cajole Chrome and Safari into
+ // firing a load event asynchronously, which is necessary to make sure the
+ // frame's document doesn't have a parser associated with it.
+ // See: https://bugs.chromium.org/p/chromium/issues/detail?id=875354
frame.src = "/common/blank.html";
t.add_cleanup(() => frame.remove());
frame.onload = t.step_func(() => {
// Make sure there is no parser. Firefox seems to have an additional
// non-spec-compliant readiness state "uninitialized", so test for the
// two known valid readiness states instead.
+ // See: https://bugzilla.mozilla.org/show_bug.cgi?id=1191683
assert_in_array(frame.contentDocument.readyState, ["interactive", "complete"]);
testBody(t, frame, doc => {});
});
@@ -49,14 +52,8 @@ function taskTest(description, testBody) {
}
taskTest("timeout", (t, frame, open) => {
- let happened = false;
- // Work around the lint script, since we can't use step_timeout here.
- frame.contentWindow['setTimeout'](() => happened = true, 100);
+ frame.contentWindow.setTimeout(t.step_func_done(), 100);
open(frame.contentDocument);
- t.step_timeout(() => {
- assert_true(happened);
- t.done();
- }, 200);
});
taskTest("window message", (t, frame, open) => {
diff --git a/lint.whitelist b/lint.whitelist
index bd9bd46c522508..7da58b3d5dbcca 100644
--- a/lint.whitelist
+++ b/lint.whitelist
@@ -161,6 +161,7 @@ SET TIMEOUT: html/semantics/embedded-content/the-iframe-element/*
SET TIMEOUT: html/semantics/embedded-content/the-img-element/*
SET TIMEOUT: html/semantics/scripting-1/the-script-element/*
SET TIMEOUT: html/webappapis/dynamic-markup-insertion/opening-the-input-stream/0*
+SET TIMEOUT: html/webappapis/dynamic-markup-insertion/opening-the-input-stream/tasks.window.js
SET TIMEOUT: html/webappapis/scripting/event-loops/*
SET TIMEOUT: html/webappapis/scripting/events/event-handler-processing-algorithm-error/*
SET TIMEOUT: html/webappapis/scripting/processing-model-2/*