blob: bf94df01b7a256fc08d44e1bff64795a16c7162d [file] [log] [blame]
<!DOCTYPE html>
<meta charset="utf-8">
<title>HTML Test: Choose browsing context - '_parent' (via window.open)</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, 'parentTopReplace');
assert_equals(e.data.isTop, true);
}));
topWindow = window.open('resources/parent-top-replace.html', 'parentTopReplace');
}, '_parent should reuse window.parent context');
</script>