OLD | NEW |
1 description("Test to make sure cached lookups on the global object are performed
correctly."); | 1 description("Test to make sure cached lookups on the global object are performed
correctly."); |
2 | 2 |
3 var functionNames = [ | 3 var functionNames = [ |
4 'addEventListener', | 4 'addEventListener', |
5 'alert', | 5 'alert', |
6 'captureEvents', | 6 'captureEvents', |
7 'clearInterval', | 7 'clearInterval', |
8 'clearTimeout', | 8 'clearTimeout', |
9 'clientInformation', | 9 'clientInformation', |
10 'close', | 10 'close', |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 'screenTop', | 49 'screenTop', |
50 'screenX', | 50 'screenX', |
51 'screenY', | 51 'screenY', |
52 'scroll', | 52 'scroll', |
53 'scrollBy', | 53 'scrollBy', |
54 'scrollTo', | 54 'scrollTo', |
55 'scrollX', | 55 'scrollX', |
56 'scrollY', | 56 'scrollY', |
57 'setInterval', | 57 'setInterval', |
58 'setTimeout', | 58 'setTimeout', |
59 'showModalDialog', | |
60 'status', | 59 'status', |
61 'stop', | 60 'stop', |
62 'window', | 61 'window', |
63 ]; | 62 ]; |
64 | 63 |
65 var cachedFunctions = []; | 64 var cachedFunctions = []; |
66 for (var i = 0; i < functionNames.length; i++) | 65 for (var i = 0; i < functionNames.length; i++) |
67 cachedFunctions[i] = new Function("return " + functionNames[i]); | 66 cachedFunctions[i] = new Function("return " + functionNames[i]); |
68 | 67 |
69 for (var i = 0; i < functionNames.length; i++) { | 68 for (var i = 0; i < functionNames.length; i++) { |
70 shouldBe("cachedFunctions["+i+"]()", functionNames[i]); | 69 shouldBe("cachedFunctions["+i+"]()", functionNames[i]); |
71 shouldBe("cachedFunctions["+i+"]()", functionNames[i]); | 70 shouldBe("cachedFunctions["+i+"]()", functionNames[i]); |
72 } | 71 } |
OLD | NEW |