| 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> | 4 <script> |
| 5 | 5 |
| 6 function test() | 6 function test() |
| 7 { | 7 { |
| 8 // A general-purpose engine for sending a sequence of protocol commands. | 8 // A general-purpose engine for sending a sequence of protocol commands. |
| 9 // The clients provide requests and response handlers, while the engine catc
hes | 9 // The clients provide requests and response handlers, while the engine catc
hes |
| 10 // errors and makes sure that once there's nothing to do completeTest() is c
alled. | 10 // errors and makes sure that once there's nothing to do completeTest() is c
alled. |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 InspectorTest.log(e.stack); | 50 InspectorTest.log(e.stack); |
| 51 InspectorTest.completeTest(); | 51 InspectorTest.completeTest(); |
| 52 return; | 52 return; |
| 53 } | 53 } |
| 54 processStep(next); | 54 processStep(next); |
| 55 } | 55 } |
| 56 InspectorTest.sendCommand(s.command, s.params, innerCallback); | 56 InspectorTest.sendCommand(s.command, s.params, innerCallback); |
| 57 } | 57 } |
| 58 } | 58 } |
| 59 | 59 |
| 60 var firstStep = { callback: callbackEnableDebugger }; | 60 var firstStep = { callback: callbackStart5 }; |
| 61 | 61 |
| 62 runRequestSeries(firstStep); | 62 runRequestSeries(firstStep); |
| 63 | 63 |
| 64 function callbackEnableDebugger() | |
| 65 { | |
| 66 // FIXME: make Runtime.getInternalProperties not depend on debugger (crb
ug.com/481845). | |
| 67 return { command: "Debugger.enable", callback: callbackStart5 }; | |
| 68 } | |
| 69 | |
| 70 // 'Object5' section -- check properties of '5' wrapped as object (has an i
nternal property). | 64 // 'Object5' section -- check properties of '5' wrapped as object (has an i
nternal property). |
| 71 | 65 |
| 72 function callbackStart5() | 66 function callbackStart5() |
| 73 { | 67 { |
| 74 // Create an wrapper object with additional property. | 68 // Create an wrapper object with additional property. |
| 75 var expression = "(function(){var r = Object(5); r.foo = 'cat';return r;
})()"; | 69 var expression = "(function(){var r = Object(5); r.foo = 'cat';return r;
})()"; |
| 76 | 70 |
| 77 return { command: "Runtime.evaluate", params: {expression: expression},
callback: callbackEval5 }; | 71 return { command: "Runtime.evaluate", params: {expression: expression},
callback: callbackEval5 }; |
| 78 } | 72 } |
| 79 function callbackEval5(result) | 73 function callbackEval5(result) |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 { | 221 { |
| 228 return o1.name === o2.name ? 0 : (o1.name < o2.name ? -1 : 1); | 222 return o1.name === o2.name ? 0 : (o1.name < o2.name ? -1 : 1); |
| 229 } | 223 } |
| 230 } | 224 } |
| 231 } | 225 } |
| 232 </script> | 226 </script> |
| 233 </head> | 227 </head> |
| 234 <body onLoad="runTest();"> | 228 <body onLoad="runTest();"> |
| 235 </body> | 229 </body> |
| 236 </html> | 230 </html> |
| OLD | NEW |