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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/inspector/console-test.js

Issue 1666563005: DevTools: merge ScriptCallStack and ScriptAsyncCallStack, move CallStacks from console to Runtime. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: testts Created 4 years, 10 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 unified diff | Download patch
OLDNEW
1 var initialize_ConsoleTest = function() { 1 var initialize_ConsoleTest = function() {
2 2
3 InspectorTest.preloadModule("source_frame"); 3 InspectorTest.preloadModule("source_frame");
4 InspectorTest.preloadPanel("console"); 4 InspectorTest.preloadPanel("console");
5 5
6 InspectorTest.evaluateInConsole = function(code, callback) 6 InspectorTest.evaluateInConsole = function(code, callback)
7 { 7 {
8 callback = InspectorTest.safeWrap(callback); 8 callback = InspectorTest.safeWrap(callback);
9 9
10 var consoleView = WebInspector.ConsolePanel._view(); 10 var consoleView = WebInspector.ConsolePanel._view();
(...skipping 29 matching lines...) Expand all
40 } 40 }
41 41
42 InspectorTest.prepareConsoleMessageText = function(messageElement, consoleMessag e) 42 InspectorTest.prepareConsoleMessageText = function(messageElement, consoleMessag e)
43 { 43 {
44 var messageText = messageElement.deepTextContent().replace(/\u200b/g, ""); 44 var messageText = messageElement.deepTextContent().replace(/\u200b/g, "");
45 // Replace scriptIds with generic scriptId string to avoid flakiness. 45 // Replace scriptIds with generic scriptId string to avoid flakiness.
46 messageText = messageText.replace(/VM\d+/g, "VM"); 46 messageText = messageText.replace(/VM\d+/g, "VM");
47 // Strip out InjectedScript line numbers from stack traces to avoid rebaseli ning each time InjectedScriptSource is edited. 47 // Strip out InjectedScript line numbers from stack traces to avoid rebaseli ning each time InjectedScriptSource is edited.
48 messageText = messageText.replace(/InjectedScript\.\w+ @ VM:\d+/g, ""); 48 messageText = messageText.replace(/InjectedScript\.\w+ @ VM:\d+/g, "");
49 // Strip out InjectedScript line numbers from console message anchor. 49 // Strip out InjectedScript line numbers from console message anchor.
50 var functionName = consoleMessage && consoleMessage.stackTrace && consoleMes sage.stackTrace[0] && consoleMessage.stackTrace[0].functionName || ""; 50 var functionName = consoleMessage && consoleMessage.stackTrace && consoleMes sage.stackTrace.callFrames[0] && consoleMessage.stackTrace.callFrames[0].functio nName || "";
51 if (functionName.indexOf("InjectedScript") !== -1) 51 if (functionName.indexOf("InjectedScript") !== -1)
52 messageText = messageText.replace(/\bVM:\d+/, ""); // Only first replace . 52 messageText = messageText.replace(/\bVM:\d+/, ""); // Only first replace .
53 if (messageText.startsWith("Navigated to")) { 53 if (messageText.startsWith("Navigated to")) {
54 var fileName = messageText.split(" ").pop().split("/").pop(); 54 var fileName = messageText.split(" ").pop().split("/").pop();
55 messageText = "Navigated to " + fileName; 55 messageText = "Navigated to " + fileName;
56 } 56 }
57 // The message might be extremely long in case of dumping stack overflow mes sage. 57 // The message might be extremely long in case of dumping stack overflow mes sage.
58 messageText = messageText.substring(0, 1024); 58 messageText = messageText.substring(0, 1024);
59 return messageText; 59 return messageText;
60 } 60 }
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 if (consoleView._visibleViewMessages.length === expectedCount) { 395 if (consoleView._visibleViewMessages.length === expectedCount) {
396 InspectorTest.addResult("Message count: " + expectedCount); 396 InspectorTest.addResult("Message count: " + expectedCount);
397 callback(); 397 callback();
398 } else { 398 } else {
399 InspectorTest.addSniffer(consoleView, "_messageAppendedForTests", ch eckAndReturn); 399 InspectorTest.addSniffer(consoleView, "_messageAppendedForTests", ch eckAndReturn);
400 } 400 }
401 } 401 }
402 } 402 }
403 403
404 } 404 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698