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 var worker; | 5 var worker; |
6 | 6 |
7 function startWorker() | 7 function startWorker() |
8 { | 8 { |
9 worker = new Worker("resources/dedicated-worker-step-into.js"); | 9 worker = new Worker("resources/dedicated-worker-step-into.js"); |
10 worker.onmessage = function(event) { }; | 10 worker.onmessage = function(event) { }; |
(...skipping 19 matching lines...) Expand all Loading... |
30 } | 30 } |
31 | 31 |
32 function didEnableWorkerDebugging(messageObject) | 32 function didEnableWorkerDebugging(messageObject) |
33 { | 33 { |
34 if ("error" in messageObject) { | 34 if ("error" in messageObject) { |
35 InspectorTest.log("FAIL: Couldn't enable worker debugger: " + messag
eObject.error.message); | 35 InspectorTest.log("FAIL: Couldn't enable worker debugger: " + messag
eObject.error.message); |
36 InspectorTest.completeTest(); | 36 InspectorTest.completeTest(); |
37 } | 37 } |
38 } | 38 } |
39 InspectorTest.sendCommand("Worker.enable", {}, didEnableWorkerDebugging); | 39 InspectorTest.sendCommand("Worker.enable", {}, didEnableWorkerDebugging); |
40 InspectorTest.sendCommand("Worker.setAutoconnectToWorkers", { "value": true
}); | 40 InspectorTest.sendCommand("Worker.setWaitForDebuggerOnStart", { "value": tru
e }); |
41 InspectorTest.sendCommand("Runtime.evaluate", { "expression": "startWorker()
" }); | 41 InspectorTest.sendCommand("Runtime.evaluate", { "expression": "startWorker()
" }); |
42 | 42 |
43 InspectorTest.eventHandler["Worker.workerCreated"] = function(messageObject) | 43 InspectorTest.eventHandler["Worker.workerCreated"] = function(messageObject) |
44 { | 44 { |
45 workerId = messageObject["params"]["workerId"]; | 45 workerId = messageObject["params"]["workerId"]; |
46 InspectorTest.log("Worker created"); | 46 InspectorTest.log("Worker created"); |
47 sendCommandToWorker("Debugger.enable", {}); | 47 sendCommandToWorker("Debugger.enable", {}); |
48 sendCommandToWorker("Runtime.run", {}); | 48 sendCommandToWorker("Runtime.run", {}); |
49 } | 49 } |
50 | 50 |
(...skipping 14 matching lines...) Expand all Loading... |
65 } | 65 } |
66 | 66 |
67 } | 67 } |
68 </script> | 68 </script> |
69 </head> | 69 </head> |
70 <body onLoad="runTest();"> | 70 <body onLoad="runTest();"> |
71 <p>Tests that dedicated worker won't crash on attempt to step into.<a href="http
s://code.google.com/p/chromium/issues/detail?id=232392">Bug 232392.</a> | 71 <p>Tests that dedicated worker won't crash on attempt to step into.<a href="http
s://code.google.com/p/chromium/issues/detail?id=232392">Bug 232392.</a> |
72 </p> | 72 </p> |
73 </body> | 73 </body> |
74 </html> | 74 </html> |
OLD | NEW |