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-suspend-setTimeout.js"); | 9 worker = new Worker("resources/dedicated-worker-suspend-setTimeout.js"); |
10 worker.onmessage = function(event) { }; | 10 worker.onmessage = function(event) { }; |
(...skipping 21 matching lines...) Expand all Loading... |
32 } | 32 } |
33 | 33 |
34 function didEnableWorkerDebugging(messageObject) | 34 function didEnableWorkerDebugging(messageObject) |
35 { | 35 { |
36 if ("error" in messageObject) { | 36 if ("error" in messageObject) { |
37 InspectorTest.log("FAIL: Couldn't enable worker debugger: " + messag
eObject.error.message); | 37 InspectorTest.log("FAIL: Couldn't enable worker debugger: " + messag
eObject.error.message); |
38 InspectorTest.completeTest(); | 38 InspectorTest.completeTest(); |
39 } | 39 } |
40 } | 40 } |
41 InspectorTest.sendCommand("Worker.enable", {}, didEnableWorkerDebugging); | 41 InspectorTest.sendCommand("Worker.enable", {}, didEnableWorkerDebugging); |
42 InspectorTest.sendCommand("Worker.setAutoconnectToWorkers", { "value": true
}); | 42 InspectorTest.sendCommand("Worker.setWaitForDebuggerOnStart", { "value": tru
e }); |
43 InspectorTest.sendCommand("Runtime.evaluate", { "expression": "startWorker()
" }); | 43 InspectorTest.sendCommand("Runtime.evaluate", { "expression": "startWorker()
" }); |
44 | 44 |
45 InspectorTest.eventHandler["Worker.workerCreated"] = function(messageObject) | 45 InspectorTest.eventHandler["Worker.workerCreated"] = function(messageObject) |
46 { | 46 { |
47 workerId = messageObject["params"]["workerId"]; | 47 workerId = messageObject["params"]["workerId"]; |
48 InspectorTest.log("Worker created"); | 48 InspectorTest.log("Worker created"); |
49 sendCommandToWorker("Debugger.enable", {}); | 49 sendCommandToWorker("Debugger.enable", {}); |
50 sendCommandToWorker("Runtime.run", {}); | 50 sendCommandToWorker("Runtime.run", {}); |
51 } | 51 } |
52 | 52 |
(...skipping 21 matching lines...) Expand all Loading... |
74 } | 74 } |
75 } | 75 } |
76 } | 76 } |
77 </script> | 77 </script> |
78 </head> | 78 </head> |
79 <body onLoad="runTest();"> | 79 <body onLoad="runTest();"> |
80 <p>Tests that setTimeout callback will not fire while script execution is paused
.<a href="https://code.google.com/p/chromium/issues/detail?id=377926">Bug 377926
.</a> | 80 <p>Tests that setTimeout callback will not fire while script execution is paused
.<a href="https://code.google.com/p/chromium/issues/detail?id=377926">Bug 377926
.</a> |
81 </p> | 81 </p> |
82 </body> | 82 </body> |
83 </html> | 83 </html> |
OLD | NEW |