OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <script type="text/javascript" src="../../http/tests/inspector-protocol/inspecto
r-protocol-test.js"></script> | 3 <script type="text/javascript" src="../../http/tests/inspector-protocol/inspecto
r-protocol-test.js"></script> |
4 <script type="text/javascript" src="resources/liveedit-me.js"></script> | 4 <script type="text/javascript" src="resources/liveedit-me.js"></script> |
5 <script> | 5 <script> |
6 | 6 |
7 function test() | 7 function test() |
8 { | 8 { |
9 // A general-purpose engine for sending a sequence of protocol commands. | 9 // A general-purpose engine for sending a sequence of protocol commands. |
10 // The clients provide requests and response handlers, while the engine catc
hes | 10 // The clients provide requests and response handlers, while the engine catc
hes |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 function callbackEvalFunction2(result) { | 133 function callbackEvalFunction2(result) { |
134 InspectorTest.log("Function evaluate: " + JSON.stringify(result.resu
lt)); | 134 InspectorTest.log("Function evaluate: " + JSON.stringify(result.resu
lt)); |
135 logEqualsCheck(result.result.value, 8); | 135 logEqualsCheck(result.result.value, 8); |
136 | 136 |
137 var patched = originalText.replace("a + b", "a # b"); | 137 var patched = originalText.replace("a + b", "a # b"); |
138 | 138 |
139 return { command: "Debugger.setScriptSource", params: { scriptId: sc
riptId, scriptSource: patched }, callback: errorCallbackSetScriptSource2 }; | 139 return { command: "Debugger.setScriptSource", params: { scriptId: sc
riptId, scriptSource: patched }, callback: errorCallbackSetScriptSource2 }; |
140 } | 140 } |
141 | 141 |
142 function errorCallbackSetScriptSource2(result) { | 142 function errorCallbackSetScriptSource2(result) { |
143 var compileError = result.compileError; | 143 var exceptionDetails = result.exceptionDetails; |
144 logCheck("Has error reported", !!compileError); | 144 logCheck("Has error reported", !!exceptionDetails); |
145 logCheck("Reported error is a compile error", !!compileError); | 145 logCheck("Reported error is a compile error", !!exceptionDetails); |
146 if (compileError) | 146 if (exceptionDetails) |
147 logEqualsCheck(compileError.lineNumber, 1); | 147 logEqualsCheck(exceptionDetails.lineNumber, 1); |
148 return next; | 148 return next; |
149 } | 149 } |
150 } | 150 } |
151 } | 151 } |
152 </script> | 152 </script> |
153 </head> | 153 </head> |
154 <body onLoad="runTest();"> | 154 <body onLoad="runTest();"> |
155 </body> | 155 </body> |
156 </html> | 156 </html> |
OLD | NEW |