Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <html lang="en"> | |
| 2 <head> | |
| 3 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
| 4 <title>view-source navigation should be blocked</title> | |
| 5 </head> | |
| 6 <script> | |
| 7 window.onunload = function() { | |
| 8 console.error('FAIL'); | |
| 9 testRunner.notifyDone(); | |
|
Nate Chapin
2016/05/27 23:57:32
Nit: if (window.testRunner)
| |
| 10 } | |
| 11 function test() { | |
| 12 window.location = "view-source:about:blank"; | |
| 13 setTimeout(function() { | |
| 14 if (window.testRunner) { | |
| 15 document.getElementById("result").innerHTML = "PASS"; | |
| 16 testRunner.notifyDone(); | |
| 17 } | |
| 18 }, 1000); | |
|
meacer
2016/05/23 23:57:47
This is ugly as it uses setTimeout with a non-zero
Charlie Reis
2016/05/24 22:54:17
Yeah, we shouldn't do this. Maybe there's an erro
Nate Chapin
2016/05/27 23:57:32
This is a bit tougher because it's view-source. No
meacer
2016/05/31 23:57:54
Looks like queueLoad triggers a browser initiated
Charlie Reis
2016/06/01 22:59:51
Do we actually need a layout test for this? You'v
| |
| 19 } | |
| 20 if (window.testRunner) { | |
| 21 testRunner.dumpAsText(); | |
| 22 testRunner.waitUntilDone(); | |
| 23 } | |
| 24 document.addEventListener('DOMContentLoaded', test, false); | |
| 25 </script> | |
| 26 <div id="result"></div> | |
| 27 </html> | |
| OLD | NEW |