| OLD | NEW |
| 1 description( | 1 description( |
| 2 "Tests that having a bad time has correct cross frame behavior." | 2 "Tests that having a bad time has correct cross frame behavior." |
| 3 ); | 3 ); |
| 4 | 4 |
| 5 if (window.testRunner) | 5 if (window.testRunner) |
| 6 testRunner.waitUntilDone(); | 6 testRunner.waitUntilDone(); |
| 7 | 7 |
| 8 var ouches = 0; | 8 var ouches = 0; |
| 9 | 9 |
| 10 function foo(array) { | 10 function foo(array) { |
| 11 for (var i = 0; i < 100; ++i) | 11 for (var i = 0; i < 100; ++i) |
| 12 array[0] = true; | 12 array[0] = true; |
| 13 if (ouches == 100) | 13 if (ouches == 100) |
| 14 testPassed("Got 100 ouches."); | 14 testPassed("Got 100 ouches."); |
| 15 else | 15 else |
| 16 testFailed("Did not get 100 ouches. Got " + ouches + " instead."); | 16 testFailed("Did not get 100 ouches. Got " + ouches + " instead."); |
| 17 if (testRunner) | 17 if (window.testRunner) |
| 18 testRunner.notifyDone(); | 18 testRunner.notifyDone(); |
| 19 } | 19 } |
| 20 | 20 |
| 21 var frame = document.getElementById("myframe"); | 21 var frame = document.getElementById("myframe"); |
| 22 | 22 |
| 23 frame.contentDocument.open(); | 23 frame.contentDocument.open(); |
| 24 frame.contentDocument.write( | 24 frame.contentDocument.write( |
| 25 "<!DOCTYPE html>\n<html><body><script type=\"text/javascript\">\n" + | 25 "<!DOCTYPE html>\n<html><body><script type=\"text/javascript\">\n" + |
| 26 "Array.prototype.__defineSetter__(0, function() { window.parent.ouches++; })
;\n" + | 26 "Array.prototype.__defineSetter__(0, function() { window.parent.ouches++; })
;\n" + |
| 27 "window.parent.foo([]);\n" + | 27 "window.parent.foo([]);\n" + |
| 28 "</script></body></html>"); | 28 "</script></body></html>"); |
| 29 frame.contentDocument.close(); | 29 frame.contentDocument.close(); |
| OLD | NEW |