summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/load-pageshow-events-window-open.html
blob: 9703502f7fbc96be606e556c81e0c43076bb5f15 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<!DOCTYPE html>
<meta charset="UTF-8">
<title>"load" and "pageshow" events don't fire on window.open() that stays on the initial empty document</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="resources/helpers.js"></script>
<body></body>
<script>
"use strict";

promise_test(async t => {
  const w = window.open();
  return assertNoLoadAndPageshowEvent(t, w)
}, "load event does not fire on window.open()");

promise_test(async t => {
  const w = window.open("");
  return assertNoLoadAndPageshowEvent(t, w)
}, "load event does not fire on window.open('')");

promise_test(async t => {
  const w = window.open("about:blank");
  return assertNoLoadAndPageshowEvent(t, w)
}, "load event does not fire on window.open('about:blank')");

promise_test(async t => {
  const w = window.open("about:blank#foo");
  return assertNoLoadAndPageshowEvent(t, w)
}, "load event does not fire on window.open('about:blank#foo')");

promise_test(async t => {
  const w = window.open("about:blank?foo");
  return assertNoLoadAndPageshowEvent(t, w)
}, "load event does not fire on window.open('about:blank?foo')");
</script>