Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(188)

Unified Diff: third_party/WebKit/LayoutTests/inspector-protocol/debugger/debugger-evaluate-in-worker-while-pause-in-page.html

Issue 2968523003: [DevTools] Migrate inspector-protocol/debugger tests to new harness (Closed)
Patch Set: all tests Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/inspector-protocol/debugger/debugger-evaluate-in-worker-while-pause-in-page.html
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/debugger/debugger-evaluate-in-worker-while-pause-in-page.html b/third_party/WebKit/LayoutTests/inspector-protocol/debugger/debugger-evaluate-in-worker-while-pause-in-page.html
deleted file mode 100644
index ddae33241a2a7b938a27b9a5faf6c5ca3af2ea28..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/inspector-protocol/debugger/debugger-evaluate-in-worker-while-pause-in-page.html
+++ /dev/null
@@ -1,80 +0,0 @@
-<html>
-<head>
-<script type="text/javascript" src="../../http/tests/inspector-protocol/resources/inspector-protocol-test.js"></script>
-<script>
-
-var worker;
-
-function testFunction()
-{
- debugger;
-}
-
-function startWorkerAndRunTest()
-{
- worker = new Worker("resources/dedicated-worker.js");
- worker.onmessage = function(event) { };
- worker.postMessage(1);
- log("Started worker");
- runTest();
-}
-
-function test()
-{
- var workerId;
- var workerRequestId = 1;
-
- function sendCommandToWorker(method, params)
- {
- InspectorTest.sendCommand("Target.sendMessageToTarget",
- {
- "targetId": workerId,
- "message": JSON.stringify({ "method": method,
- "params": params,
- "id": workerRequestId })
- });
- return workerRequestId++;
- }
-
- InspectorTest.sendCommand("Debugger.enable", {});
- InspectorTest.eventHandler["Debugger.paused"] = handleDebuggerPausedInTestFunction;
- InspectorTest.sendCommand("Runtime.evaluate", { "expression": "testFunction()" });
-
- function handleDebuggerPausedInTestFunction(messageObject)
- {
- InspectorTest.log("Paused on 'debugger;'");
- InspectorTest.sendCommand("Target.setAutoAttach", {autoAttach: true, waitForDebuggerOnStart: false}, didEnableWorkerDebugging);
- }
-
- function didEnableWorkerDebugging(messageObject)
- {
- if ("error" in messageObject) {
- InspectorTest.log("FAIL: Couldn't enable worker debugger: " + messageObject.error.message);
- InspectorTest.completeTest();
- }
- }
-
- var savedWorkerRequestId = -1;
- InspectorTest.eventHandler["Target.attachedToTarget"] = function(messageObject)
- {
- workerId = messageObject["params"]["targetInfo"]["targetId"];
- InspectorTest.log("Worker created");
- InspectorTest.log("didConnectToWorker");
- savedWorkerRequestId = sendCommandToWorker("Runtime.evaluate", { "expression": "1+1"});
- }
-
- InspectorTest.eventHandler["Target.receivedMessageFromTarget"] = function(messageObject)
- {
- var message = JSON.parse(messageObject["params"]["message"]);
- if (message["id"] === savedWorkerRequestId) {
- var value = message["result"]["result"]["value"];
- InspectorTest.log("Successfully evaluated, result: " + value);
- InspectorTest.completeTest();
- }
- }
-}
-</script>
-</head>
-<body onLoad="startWorkerAndRunTest();">
-</body>
-</html>

Powered by Google App Engine
This is Rietveld 408576698