| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <body> | 3 <body> |
| 4 <div id="console"></div> | 4 <div id="console"></div> |
| 5 <script> | 5 <script> |
| 6 function done() { | 6 function done() { |
| 7 if (window.testRunner) | 7 if (window.testRunner) |
| 8 testRunner.notifyDone(); | 8 testRunner.notifyDone(); |
| 9 } | 9 } |
| 10 window.func = function () { | 10 window.func = function () { |
| 11 alert("FAIL: Wrong function."); | 11 alert("FAIL: Wrong function."); |
| 12 done(); | 12 done(); |
| 13 }; | 13 }; |
| 14 document.foo = "FAIL: Wrong wrappers."; | 14 document.foo = "FAIL: Wrong wrappers."; |
| 15 if (window.testRunner) { | 15 if (window.testRunner) { |
| 16 testRunner.dumpAsText(); | 16 testRunner.dumpAsText(); |
| 17 testRunner.waitUntilDone(); | 17 testRunner.waitUntilDone(); |
| 18 testRunner.evaluateScriptInIsolatedWorld( | 18 testRunner.evaluateScriptInIsolatedWorld( |
| 19 0, | 19 1, |
| 20 "document.foo = 'PASS';\n" + | 20 "document.foo = 'PASS';\n" + |
| 21 "window.func = function () {\n" + | 21 "window.func = function () {\n" + |
| 22 " alert(document.foo);\n" + | 22 " alert(document.foo);\n" + |
| 23 " window.location = 'javascript:done()';\n" + | 23 " window.location = 'javascript:done()';\n" + |
| 24 "};\n" + | 24 "};\n" + |
| 25 "window.setTimeout('func()', 0);"); | 25 "window.setTimeout('func()', 0);"); |
| 26 } | 26 } |
| 27 </script> | 27 </script> |
| 28 </body> | 28 </body> |
| 29 </html> | 29 </html> |
| OLD | NEW |