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

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

Issue 2440293002: [LayoutTests] Remove line and column of evaluate function (Closed)
Patch Set: Remove android expected output Created 4 years, 1 month 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.selectMainExecutionContext = function() 6 InspectorTest.selectMainExecutionContext = function()
7 { 7 {
8 var executionContexts = InspectorTest.mainTarget.runtimeModel.executionConte xts(); 8 var executionContexts = InspectorTest.mainTarget.runtimeModel.executionConte xts();
9 for (var context of executionContexts) { 9 for (var context of executionContexts) {
10 if (context.isDefault) { 10 if (context.isDefault) {
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 callback(text); 47 callback(text);
48 } 48 }
49 InspectorTest.evaluateInConsole(code, mycallback, dontForceMainContext); 49 InspectorTest.evaluateInConsole(code, mycallback, dontForceMainContext);
50 } 50 }
51 51
52 InspectorTest.prepareConsoleMessageText = function(messageElement, consoleMessag e) 52 InspectorTest.prepareConsoleMessageText = function(messageElement, consoleMessag e)
53 { 53 {
54 var messageText = messageElement.deepTextContent().replace(/\u200b/g, ""); 54 var messageText = messageElement.deepTextContent().replace(/\u200b/g, "");
55 // Replace scriptIds with generic scriptId string to avoid flakiness. 55 // Replace scriptIds with generic scriptId string to avoid flakiness.
56 messageText = messageText.replace(/VM\d+/g, "VM"); 56 messageText = messageText.replace(/VM\d+/g, "VM");
57 // Remove line and column of evaluate method.
58 messageText = messageText.replace(/(at eval \(eval at evaluate) \(:\d+:\d+\) /, '$1');
59
57 if (messageText.startsWith("Navigated to")) { 60 if (messageText.startsWith("Navigated to")) {
58 var fileName = messageText.split(" ").pop().split("/").pop(); 61 var fileName = messageText.split(" ").pop().split("/").pop();
59 messageText = "Navigated to " + fileName; 62 messageText = "Navigated to " + fileName;
60 } 63 }
61 // The message might be extremely long in case of dumping stack overflow mes sage. 64 // The message might be extremely long in case of dumping stack overflow mes sage.
62 messageText = messageText.substring(0, 1024); 65 messageText = messageText.substring(0, 1024);
63 return messageText; 66 return messageText;
64 } 67 }
65 68
66 InspectorTest.disableConsoleViewport = function() 69 InspectorTest.disableConsoleViewport = function()
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 if (consoleView._visibleViewMessages.length === expectedCount) { 418 if (consoleView._visibleViewMessages.length === expectedCount) {
416 InspectorTest.addResult("Message count: " + expectedCount); 419 InspectorTest.addResult("Message count: " + expectedCount);
417 callback(); 420 callback();
418 } else { 421 } else {
419 InspectorTest.addSniffer(consoleView, "_messageAppendedForTests", ch eckAndReturn); 422 InspectorTest.addSniffer(consoleView, "_messageAppendedForTests", ch eckAndReturn);
420 } 423 }
421 } 424 }
422 } 425 }
423 426
424 } 427 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698