navigate-to-javascript.html (655B)
1 <!doctype html> 2 <script src="/resources/testharness.js"></script> 3 <script src="/resources/testharnessreport.js"></script> 4 <iframe id="iframe" name="i" src="/common/blank.html"></iframe> 5 6 <script> 7 async_test(t => { 8 window.onload = t.step_func(() => { 9 navigation.onnavigate = t.unreached_func("onnavigate should not have fired in source window"); 10 11 iframe.contentWindow.navigation.onnavigate = t.unreached_func("onnavigate should not have fired in iframe window"); 12 13 iframe.contentWindow.location.href = "javascript:'foo'"; 14 15 iframe.onload = () => t.done(); 16 }); 17 }, "navigate event does not fire for javascript: URL navigations"); 18 </script>