| OLD | NEW |
| (Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <head> |
| 4 <script> |
| 5 function runTest() { |
| 6 window.onfocus = windowFocused; |
| 7 window.onblur = windowBlurred; |
| 8 |
| 9 if (window.testRunner) { |
| 10 testRunner.waitUntilDone(); |
| 11 testRunner.dumpAsText(); |
| 12 testRunner.setWindowIsKey(false); |
| 13 window.open('javascript:window.focus()', '_self', ''); |
| 14 setTimeout(function() { testRunner.notifyDone(); }, 0); |
| 15 } |
| 16 } |
| 17 |
| 18 function log(message) { |
| 19 var console = document.getElementById("console"); |
| 20 var li = document.createElement("li"); |
| 21 var text = document.createTextNode(message); |
| 22 |
| 23 console.appendChild(li); |
| 24 li.appendChild(text); |
| 25 } |
| 26 |
| 27 function windowFocused() { |
| 28 log("FAIL: Window was focused"); |
| 29 } |
| 30 |
| 31 function windowBlurred() { |
| 32 log("Window was blurred"); |
| 33 } |
| 34 </script> |
| 35 </head> |
| 36 <body> |
| 37 This tests that a window cannot focus itself by using javascript: urls. |
| 38 <ul id="console"></ul> |
| 39 <script>runTest();</script> |
| 40 </body> |
| 41 </html> |
| OLD | NEW |