Need a way to mark a DOM attribute as runtime conditionally read-write
[WebKit-https.git] / LayoutTests / fast / events / onblur-remove.html
1 <html>
2   <head>
3       <script src="../../resources/js-test-pre.js"></script>
4     <script>
5         if (window.testRunner)
6             testRunner.waitUntilDone();
7
8         var blurEventCount = 0;
9
10         window.onload = function() { document.getElementById("input").focus(); }
11
12         function finish() {
13             var f = document.getElementById('f')
14
15             f.innerHTML = '';
16
17             shouldBe("blurEventCount", "0");
18
19             debug('<br /><span class="pass">TEST COMPLETE</span>');
20             if (window.testRunner)
21                 testRunner.notifyDone();
22         }
23     </script>
24   </head>
25 <body>
26     <p id="description"></p>
27     <form id='f'>
28       <input id="input" onblur="blurEventCount++" onfocus="setTimeout('finish()', 0)">
29     </form>
30     <div id="console"></div>
31     <script>
32         description("This tests that elements shouldn't emit any onblur events when they are being removed from the document.");
33     </script>
34   </body>
35 </html>