browser/base/content/test/tabs/open_window_in_new_tab.html
author Emilio Cobos Álvarez <emilio@crisal.io>
Fri, 24 May 2019 14:11:36 +0000
changeset 475376 a398387437aee799483ac38ed2e7eb72312841f7
permissions -rw-r--r--
Bug 1553769 - Add a test for switching a tab via window.focus() on a related tab. r=dao Differential Revision: https://phabricator.services.mozilla.com/D32396

<!doctype html>
<script>
function openWindow() {
  window.childWindow = window.open(location.href + "?opened", "", "");
}
</script>
<button id="open" onclick="openWindow()">Open window</button>
<button id="focus" onclick="window.childWindow.focus()">Focus window</button>