OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <script src="../../http/tests/inspector/inspector-test.js"></script> | 3 <script src="../../http/tests/inspector/inspector-test.js"></script> |
4 <script src="../../http/tests/inspector/console-test.js"></script> | 4 <script src="../../http/tests/inspector/console-test.js"></script> |
5 <script> | 5 <script> |
6 | 6 |
7 (function() { | 7 (function() { |
8 var _originalFunctionCall = Function.prototype.call; | 8 var _originalFunctionCall = Function.prototype.call; |
9 var _originalFunctionApply = Function.prototype.apply; | 9 var _originalFunctionApply = Function.prototype.apply; |
10 | 10 |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 | 65 |
66 function testThrowConstructorName() | 66 function testThrowConstructorName() |
67 { | 67 { |
68 var obj = {}; | 68 var obj = {}; |
69 Object.defineProperty(obj, "constructor", { | 69 Object.defineProperty(obj, "constructor", { |
70 get: throwGetter | 70 get: throwGetter |
71 }); | 71 }); |
72 return obj; | 72 return obj; |
73 } | 73 } |
74 | 74 |
| 75 function testOverriddenIsFinite() |
| 76 { |
| 77 window.isFinite = throwGetter; |
| 78 var out; |
| 79 (function() { |
| 80 out = arguments; |
| 81 })("arg1", "arg2"); |
| 82 return out; |
| 83 } |
| 84 |
75 function test() | 85 function test() |
76 { | 86 { |
77 InspectorTest.runTestSuite([ | 87 InspectorTest.runTestSuite([ |
78 function evaluateInConsole(next) | 88 function evaluateInConsole(next) |
79 { | 89 { |
80 InspectorTest.evaluateInConsole("testOverriddenArrayPushAndMathMax()
"); | 90 var expressions = [ |
81 InspectorTest.evaluateInConsole("testOverriddenConstructorName()"); | 91 "testOverriddenArrayPushAndMathMax()", |
82 InspectorTest.evaluateInConsole("testThrowConstructorName()"); | 92 "testOverriddenConstructorName()", |
83 InspectorTest.runAfterPendingDispatches(next); | 93 "testThrowConstructorName()", |
| 94 "testOverriddenIsFinite()" |
| 95 ]; |
| 96 |
| 97 function iterate() |
| 98 { |
| 99 var expr = expressions.shift(); |
| 100 if (!expr) { |
| 101 InspectorTest.runAfterPendingDispatches(next); |
| 102 return; |
| 103 } |
| 104 InspectorTest.evaluateInConsole(expr, iterate); |
| 105 } |
| 106 iterate(); |
84 }, | 107 }, |
85 | 108 |
86 function testRuntimeAgentCallFunctionOn(next) | 109 function testRuntimeAgentCallFunctionOn(next) |
87 { | 110 { |
88 RuntimeAgent.evaluate("({ a : 1, b : 2 })", step1); | 111 RuntimeAgent.evaluate("({ a : 1, b : 2 })", step1); |
89 | 112 |
90 function step1(error, result, wasThrown) | 113 function step1(error, result, wasThrown) |
91 { | 114 { |
92 function sum() | 115 function sum() |
93 { | 116 { |
(...skipping 19 matching lines...) Expand all Loading... |
113 </script> | 136 </script> |
114 </head> | 137 </head> |
115 | 138 |
116 <body onload="runTest()"> | 139 <body onload="runTest()"> |
117 <p> | 140 <p> |
118 Tests that overriding global methods (like Array.prototype.push, Math.max) will
not break the inspector. | 141 Tests that overriding global methods (like Array.prototype.push, Math.max) will
not break the inspector. |
119 </p> | 142 </p> |
120 | 143 |
121 </body> | 144 </body> |
122 </html> | 145 </html> |
OLD | NEW |