003.html (968B)
1 <!doctype html> 2 <title>unload event properties</title> 3 <script src="/resources/testharness.js"></script> 4 <script src="/resources/testharnessreport.js"></script> 5 <div id="log"></div> 6 <script> 7 var t = async_test(); 8 var do_test; 9 10 onload = function() {setTimeout(function() { 11 var iframe = document.getElementsByTagName("iframe")[0] 12 13 iframe.onload = function() { 14 setTimeout(function() { 15 iframe.contentWindow.location="002-2.html"; 16 }, 100); 17 iframe.onload = t.step_func(function() {t.done()}); 18 }; 19 20 do_test = function(e) { 21 assert_equals(e.type, "unload"); 22 assert_equals(e.target, iframe.contentDocument); 23 assert_equals(e.currentTarget, iframe.contentWindow); 24 assert_false(e.bubbles, "bubbles"); 25 assert_false(e.cancelable, "cancelable"); 26 } 27 28 iframe.src = "003-1.html?" + Math.random(); 29 30 }, 100)}; 31 32 </script> 33 <iframe></iframe>