2 <script src=
"/resources/testharness.js"></script>
3 <script src=
"/resources/testharnessreport.js"></script>
5 <a id=
"link" href=
"/common/blank.html?foo" target=
"windowname">Click me
</a>
6 <iframe id=
"i" name=
"windowname" src=
"/common/blank.html"></iframe>
10 navigation
.onnavigate
= t
.unreached_func("onnavigate must not fire in the source window");
11 window
.onload
= t
.step_func(() => {
12 i
.contentWindow
.navigation
.onnavigate
= t
.step_func_done(e
=> {
13 assert_equals(e
.navigationType
, "push", "navigationType");
14 assert_true(e
.cancelable
, "cancelable");
15 assert_true(e
.canTransition
, "canTransition");
16 assert_false(e
.userInitiated
, "userInitiated");
17 assert_false(e
.hashChange
, "hashChange");
18 assert_equals(e
.formData
, null, "formData");
19 assert_equals(e
.destination
.url
, link
.href
, "destination.url");
20 assert_false(e
.destination
.sameDocument
, "destination.sameDocument");
21 assert_equals(e
.destination
.key
, null, "destination.key");
22 assert_equals(e
.destination
.id
, null, "destination.id");
23 assert_equals(e
.destination
.index
, -1, "destination.index");
28 }, "clicking on an <a> element that navigates cross-document targeting a same-origin window");