Back to Chromium

Variations on a theme of window.open

ios/testing/data/http_server_files/window_open.html

149.0.7827.21.8 KB
Original Source
CodeExpected result
about:blank opened in new tab
about:blank opened in new tab
Hash-only location.replace in new empty window
webScenarioWindowOpenRegularLinkabout:blank opened in new window or tab
(via target)
webScenarioWindowOpenWithSpecialURL/..; opened in new window or tab
webScenarioWindowOpenRegularLinkMultipleTimesabout:blank opened in new window or tab
(via target)
webScenarioWindowOpenWithJavaScriptInHrefabout:blank opened in a new window or tab
(via window.open() on a <a href>)
webScenarioWindowOpenWithButtonOnClickabout:blank opened in a new window or tab
(via window.open() in a onclick)
webScenarioWindowOpenTabWithAssignmentToHrefabout:blank page opened in new window or tab
(via assignment to window.location.href)
webScenarioWindowOpenWithMetaRefreshabout:blank page opened in new window or tab
(via Meta-Refresh in new window)
webScenarioWindowOpenWithPreventDefaultLinkabout:blank opened in a new window, with an href and a preventDefault
Open a window and set window.location after reading title
Open a window and call location.assign on it
webScenarioWindowOpenBlankTargetWithImmediateCloseOpen a window with target=_blank that immediately closes itself
webScenarioWindowOpenSameURLWithBlankTargetOpen same window with target=_blank
webScenarioWindowOpenWithDelayedCloseOpen a window that closes itself after two seconds
Trying to close the current window should fail.
Open a window, then inject a window.open call into that window.