| 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/resource
s/inspector-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 |
| 11 // errors and makes sure that once there's nothing to do completeTest() is c
alled. | 11 // errors and makes sure that once there's nothing to do completeTest() is c
alled. |
| 12 // @param step is an object with command, params and callback fields | 12 // @param step is an object with command, params and callback fields |
| 13 function runRequestSeries(step) { | 13 function runRequestSeries(step) { |
| (...skipping 18 matching lines...) Expand all Loading... |
| 32 var next = currentStep.callback(); | 32 var next = currentStep.callback(); |
| 33 processStep(next); | 33 processStep(next); |
| 34 return; | 34 return; |
| 35 } | 35 } |
| 36 | 36 |
| 37 var innerCallback = function(response) { | 37 var innerCallback = function(response) { |
| 38 var next; | 38 var next; |
| 39 if ("error" in response) { | 39 if ("error" in response) { |
| 40 if (!("errorHandler" in currentStep)) { | 40 if (!("errorHandler" in currentStep)) { |
| 41 // Error message is not logged intentionally, it may be
platform-specific. | 41 // Error message is not logged intentionally, it may be
platform-specific. |
| 42 InspectorTest.log("Protocol command '" + currentStep.com
mand + "' failed"); | 42 InspectorTest.log("dp command '" + currentStep.command +
"' failed"); |
| 43 InspectorTest.completeTest(); | 43 InspectorTest.completeTest(); |
| 44 return; | 44 return; |
| 45 } | 45 } |
| 46 try { | 46 try { |
| 47 next = currentStep.errorHandler(response.error); | 47 next = currentStep.errorHandler(response.error); |
| 48 } catch (e) { | 48 } catch (e) { |
| 49 InspectorTest.log(e.stack); | 49 InspectorTest.log(e.stack); |
| 50 InspectorTest.completeTest(); | 50 InspectorTest.completeTest(); |
| 51 return; | 51 return; |
| 52 } | 52 } |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 logEqualsCheck(exceptionDetails.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 |