summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/browsers/windows/browsing-context-names/choose-_parent-002.html
blob: 7b7d561030e5ada63c78ff01def056628c37e2eb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<!DOCTYPE html>
<meta charset="utf-8">
<title>HTML Test: Choose browsing context - '_parent' (nested contexts)</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="log"></div>
<script>
async_test(t => {
  var topWindow;
  t.add_cleanup(() => topWindow.close());
  window.addEventListener('message', t.step_func_done(e => {
    assert_equals(e.data.name, 'iframeParent');
    assert_false(e.data.isTop, 'window.parent is not top');
  }));
  topWindow = window.open('resources/choose-_parent-002-window.html', '_blank');
}, 'choosing _parent context: multiple nested contexts');
</script>