diff --git a/navigation-api/navigate-event/navigate-history-back-bfcache.html b/navigation-api/navigate-event/navigate-history-back-bfcache.html
new file mode 100644
index 000000000000000..0336ff1c2fe0ed1
--- /dev/null
+++ b/navigation-api/navigate-event/navigate-history-back-bfcache.html
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
diff --git a/navigation-api/navigation-methods/return-value/back-204-205-download.html b/navigation-api/navigation-methods/return-value/back-204-205-download.html
index 5bedbf21e868125..3e19bcb0f5017a9 100644
--- a/navigation-api/navigation-methods/return-value/back-204-205-download.html
+++ b/navigation-api/navigation-methods/return-value/back-204-205-download.html
@@ -32,11 +32,9 @@
const indexBefore = i.contentWindow.navigation.currentEntry.index;
- // One might be surprised that navigate does not fire. (It does fire for the
- // corresponding tests of navigation.navigate(), i.e., this is
- // traversal-specific behavior.) See https://github.com/WICG/navigation-api/issues/207
- // for some discussion.
- i.contentWindow.navigation.onnavigate = t.unreached_func("onnavigate should not be called");
+ let onnavigate_called = false;
+ i.contentWindow.navigation.onnavigate = () => onnavigate_called = true;
+ i.contentWindow.onunload = t.unreached_func("onunload should not be called");
i.contentWindow.navigation.onnavigatesuccess = t.unreached_func("onnavigatesuccess should not be called");
i.contentWindow.navigation.onnavigateerror = t.unreached_func("onnavigateerror should not be called");
@@ -47,6 +45,7 @@
await new Promise(resolve => t.step_timeout(resolve, 50));
assert_equals(i.contentWindow.navigation.currentEntry.index, indexBefore);
assert_equals(i.contentWindow.navigation.transition, null);
+ assert_true(onnavigate_called);
}, `back() promises to ${description} never settle`);
}
diff --git a/navigation-api/ordering-and-transition/back-cross-document-event-order.html b/navigation-api/ordering-and-transition/back-cross-document-event-order.html
new file mode 100644
index 000000000000000..bde5697001c9ea6
--- /dev/null
+++ b/navigation-api/ordering-and-transition/back-cross-document-event-order.html
@@ -0,0 +1,36 @@
+
+
+
+
+
diff --git a/navigation-api/ordering-and-transition/navigate-cross-document-event-order.html b/navigation-api/ordering-and-transition/navigate-cross-document-event-order.html
index 34a9b79fb5f01e0..7a8c179259551a0 100644
--- a/navigation-api/ordering-and-transition/navigate-cross-document-event-order.html
+++ b/navigation-api/ordering-and-transition/navigate-cross-document-event-order.html
@@ -6,7 +6,7 @@
async_test(t => {
let events = [];
function finish() {
- assert_array_equals(events, ["onnavigate", "readystateinteractive", "domcontentloaded", "readystatecomplete", "onload", "onpageshow"]);
+ assert_array_equals(events, ["onnavigate", "onunload", "readystateinteractive", "domcontentloaded", "readystatecomplete", "onload", "onpageshow"]);
t.done();
};
@@ -24,6 +24,7 @@
i.contentDocument.addEventListener("DOMContentLoaded", () => events.push("domcontentloaded"));
i.contentDocument.onreadystatechange = () => events.push("readystate" + i.contentDocument.readyState);
};
+ i.contentWindow.onunload = () => events.push("onunload");
i.contentWindow.navigation.onnavigate = () => events.push("onnavigate");
i.contentWindow.navigation.navigate("?1").committed.then(
() => events.push("promisefulfilled"), () => events.push("promiserejected"));