This is not what navigation-api/navigation-activation/activation-initial-about-blank.html tests.
The test asserts that after an iframe navigates away from its initial about:blank:
assert_equals(i.contentWindow.navigation.activation.from.url, "about:blank");
assert_equals(i.contentWindow.navigation.activation.from.index, -1);
Per the HTML spec, navigation.activation.from should be null in this case, so accessing .url/.index should throw.
NavigationActivation's from attribute description (HTML#navigation-activation-interface) states from is null "if [the previous Document] was the initial about:blank Document".
- The initial about:blank can never appear as a
NavigationHistoryEntry anywhere: HTML#dom-navigation-entries returns the empty list when the navigation has entries and events disabled, which is true whenever the document's is initial about:blank is true. So an activation.from pointing at the initial about:blank is not just spec-incorrect — there is no entry it could legitimately be.
- "Update document for history step application" step 7 (HTML#updating-the-document) only sets the activation's old entry if the previous SHE is in the entry list, or if the navigation is replace+same-origin and the previous document's is initial about:blank is false. Both conditions fail when navigating away from the initial about:blank, so old entry stays
null.
This is not what
navigation-api/navigation-activation/activation-initial-about-blank.htmltests.The test asserts that after an iframe navigates away from its initial
about:blank:Per the HTML spec,
navigation.activation.fromshould benullin this case, so accessing.url/.indexshould throw.NavigationActivation'sfromattribute description (HTML#navigation-activation-interface) statesfromisnull"if [the previous Document] was the initialabout:blankDocument".NavigationHistoryEntryanywhere: HTML#dom-navigation-entries returns the empty list when the navigation has entries and events disabled, which is true whenever the document's is initial about:blank is true. So anactivation.frompointing at the initial about:blank is not just spec-incorrect — there is no entry it could legitimately be.null.