| OLD | NEW |
| 1 function log(s) | 1 function log(s) |
| 2 { | 2 { |
| 3 document.getElementById("console").appendChild(document.createTextNode(s + "
\n")); | 3 document.getElementById("console").appendChild(document.createTextNode(s + "
\n")); |
| 4 } | 4 } |
| 5 | 5 |
| 6 function shouldBe(a, b, shouldNotPrintValues) | 6 function shouldBe(a, b, shouldNotPrintValues) |
| 7 { | 7 { |
| 8 var evalA, evalB; | 8 var evalA, evalB; |
| 9 try { | 9 try { |
| 10 evalA = eval(a); | 10 evalA = eval(a); |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 | 51 |
| 52 function canGet(keyPath) | 52 function canGet(keyPath) |
| 53 { | 53 { |
| 54 try { | 54 try { |
| 55 return eval("window." + keyPath) !== undefined; | 55 return eval("window." + keyPath) !== undefined; |
| 56 } catch(e) { | 56 } catch(e) { |
| 57 return false; | 57 return false; |
| 58 } | 58 } |
| 59 } | 59 } |
| 60 | 60 |
| 61 function shouldThrowException(a) { |
| 62 try { |
| 63 var evalA = eval(e); |
| 64 log("FAIL: " + a + " should have thrown an exception, but instead return
ed " + evalA + "."); |
| 65 return false; |
| 66 } catch (e) { |
| 67 log("PASS: " + a + " should have thrown an exception, and did."); |
| 68 return true; |
| 69 } |
| 70 } |
| 71 |
| 61 function accessThrowsException(keyPath) { | 72 function accessThrowsException(keyPath) { |
| 62 try { | 73 try { |
| 63 eval("window." + keyPath); | 74 eval("window." + keyPath); |
| 64 return false; | 75 return false; |
| 65 } catch (e) { | 76 } catch (e) { |
| 66 return true; | 77 return true; |
| 67 } | 78 } |
| 68 } | 79 } |
| 69 | 80 |
| 70 function deletionThrowsException(keyPath) { | 81 function deletionThrowsException(keyPath) { |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 function doneHandler() { | 229 function doneHandler() { |
| 219 if (win.closed) { | 230 if (win.closed) { |
| 220 if (window.testRunner) | 231 if (window.testRunner) |
| 221 testRunner.notifyDone(); | 232 testRunner.notifyDone(); |
| 222 return; | 233 return; |
| 223 } | 234 } |
| 224 | 235 |
| 225 setTimeout(doneHandler, 5); | 236 setTimeout(doneHandler, 5); |
| 226 } | 237 } |
| 227 } | 238 } |
| OLD | NEW |