Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <html> | |
|
haraken
2014/08/28 17:32:39
Make the test name more descriptive.
vogelheim
2014/08/29 15:20:52
Done.
| |
| 2 <head> | |
| 3 <script> | |
|
haraken
2014/08/28 17:32:39
You can include resources/js-test.js, which has a
vogelheim
2014/08/29 15:20:52
Done.
| |
| 4 if (window.testRunner) { | |
| 5 testRunner.dumpAsText(); | |
|
haraken
2014/08/28 17:32:39
Once you include js-test.js, testRunner.dumpAsText
vogelheim
2014/08/29 15:20:52
Done.
| |
| 6 testRunner.waitUntilDone(); | |
| 7 } | |
| 8 | |
| 9 function test() { | |
| 10 root=document.documentElement; | |
|
haraken
2014/08/28 17:32:38
Use 4-indent space.
haraken
2014/08/28 17:32:39
Add 'var' to local variables.
vogelheim
2014/08/29 15:20:52
Done.
vogelheim
2014/08/29 15:20:52
Done. (Here & elsewhere.)
| |
| 11 iframe=root.ownerDocument.createElementNS('http://www.w3.org/1999/xhtml','ifra me'); | |
|
haraken
2014/08/28 17:32:38
Add one space around '='.
vogelheim
2014/08/29 15:20:52
Done.
| |
| 12 iframe.onload=iframe_onload_fn; | |
|
haraken
2014/08/28 17:32:39
iframe_onload_fn => iframeLoaded
Use camelCase na
vogelheim
2014/08/29 15:20:52
Done.
| |
| 13 root.appendChild(iframe); | |
| 14 } | |
| 15 function iframe_onload_fn() { | |
|
haraken
2014/08/28 17:32:39
Add one empty line between functions.
vogelheim
2014/08/29 15:20:52
Done.
| |
| 16 defaultView=iframe.contentDocument.defaultView; | |
| 17 defaultView.onpageshow=onPageShow; | |
| 18 iframe.src=null; | |
| 19 window.setTimeout(triggerFn, 100); | |
|
haraken
2014/08/28 17:32:38
triggerFn => nextIframeLoaded
Use a more descript
vogelheim
2014/08/29 15:20:52
Done.
| |
| 20 } | |
| 21 function onPageShow() { | |
| 22 problem_ref=arguments[0]; | |
| 23 } | |
| 24 function triggerFn() { | |
| 25 document.write('<p>' + problem_ref.path + '</p>'); | |
|
haraken
2014/08/28 17:32:39
Don't use document.write unless it's really needed
vogelheim
2014/08/29 15:20:52
Done.
| |
| 26 document.write('<p>PASS: totally did not crash.</p>'); | |
| 27 testRunner.notifyDone(); | |
| 28 } | |
| 29 </script> | |
|
haraken
2014/08/28 17:32:39
Put this <script> tag in <body>. Then you won't ne
vogelheim
2014/08/29 15:20:52
Done. (Well, it's still in the header, but the onl
| |
| 30 </head> | |
| 31 <body onload="test();"> | |
| 32 <p>This is a regression test for crbug.com/400476. It should not crash and then brag about it.</p> | |
| 33 </body> | |
| 34 </html> | |
| OLD | NEW |