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

Unified Diff: third_party/WebKit/LayoutTests/inspector-protocol/console/exception-from-worker-contains-stack.html

Issue 2151273003: [DevTools] Move browser logging from Console domain to Log domain. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@internals-method
Patch Set: protocol improvements Created 4 years, 5 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/console/exception-from-worker-contains-stack.html
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/console/exception-from-worker-contains-stack.html b/third_party/WebKit/LayoutTests/inspector-protocol/console/exception-from-worker-contains-stack.html
deleted file mode 100644
index b612c9bedf2010e801e65ac737ac5a002d009e73..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/inspector-protocol/console/exception-from-worker-contains-stack.html
+++ /dev/null
@@ -1,76 +0,0 @@
-<html>
-<head>
-<script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script>
-<script>
-
-var worker1;
-var worker2;
-
-function startWorkers()
-{
- worker1 = new Worker("resources/worker-with-throw.js");
- worker1.onerror = function(e) {
- e.preventDefault();
- worker1.terminate();
- }
- worker2 = new Worker("resources/worker-with-throw.js");
-}
-
-function test()
-{
- InspectorTest.sendCommandOrDie("Console.enable", {});
- InspectorTest.sendCommandOrDie("Worker.enable", {}, didEnableWorkerDebugging);
-
- function didEnableWorkerDebugging(event)
- {
- InspectorTest.sendCommandOrDie("Runtime.evaluate", { expression: "startWorkers()" });
- }
-
- var workerRequestId = 1;
- function sendCommandToWorker(method, params, workerId)
- {
- InspectorTest.sendCommand("Worker.sendMessageToWorker",
- {
- "workerId": workerId,
- "message": JSON.stringify({ "method": method,
- "params": params,
- "id": workerRequestId++ })
- });
- }
-
- var waitForWorkers = 2;
- InspectorTest.eventHandler["Worker.workerCreated"] = function(messageObject)
- {
- var workerId = messageObject["params"]["workerId"];
- InspectorTest.log("Worker created");
- sendCommandToWorker("Runtime.enable", {}, workerId);
- if (!--waitForWorkers)
- InspectorTest.sendCommandOrDie("Runtime.evaluate", { expression: "worker1.postMessage(239);worker2.postMessage(42);" });
- }
-
- var workerTerminated = false;
- var messageReceived = false;
- InspectorTest.eventHandler["Worker.dispatchMessageFromWorker"] = function(messageObject)
- {
- var message = JSON.parse(messageObject["params"]["message"]);
- if (message["method"] === "Runtime.exceptionThrown") {
- var callFrames = message.params.details.stackTrace ? message.params.details.stackTrace.callFrames : [];
- InspectorTest.log(callFrames.length > 0 ? "Message with stack trace received." : "[FAIL] Message contains empty stack trace");
- messageReceived = true;
- if (messageReceived && workerTerminated)
- InspectorTest.completeTest();
- }
- }
-
- InspectorTest.eventHandler["Worker.workerTerminated"] = function(messageObject)
- {
- InspectorTest.eventHandler["Worker.workerTerminated"] = undefined;
- workerTerminated = true;
- if (messageReceived && workerTerminated)
- InspectorTest.completeTest();
- }
-}
-</script>
-</head>
-<body onload="runTest()">Tests that console message from worker contains stack trace.</body>
-</html>

Powered by Google App Engine
This is Rietveld 408576698