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

Unified Diff: third_party/WebKit/Source/devtools/front_end/Tests.js

Issue 2474073005: DevTools: add the logging aspect into the PerformanceMonitor (Closed)
Patch Set: test fixed 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/front_end/Tests.js
diff --git a/third_party/WebKit/Source/devtools/front_end/Tests.js b/third_party/WebKit/Source/devtools/front_end/Tests.js
index af949dad16ebc424d6eda2088c433620d27d08ab..e821282a6a4b07b5fb8d9f26a85fcfa0837f0662 100644
--- a/third_party/WebKit/Source/devtools/front_end/Tests.js
+++ b/third_party/WebKit/Source/devtools/front_end/Tests.js
@@ -517,13 +517,21 @@
};
TestSuite.prototype.testConsoleOnNavigateBack = function() {
- if (WebInspector.multitargetConsoleModel.messages().length === 1)
- firstConsoleMessageReceived.call(this);
+
+ function filteredMessages() {
+ return WebInspector.multitargetConsoleModel.messages().filter(
+ a => a.source !== WebInspector.ConsoleMessage.MessageSource.Violation);
+ }
+
+ if (filteredMessages().length === 1)
+ firstConsoleMessageReceived.call(this, null);
else
WebInspector.multitargetConsoleModel.addEventListener(
WebInspector.ConsoleModel.Events.MessageAdded, firstConsoleMessageReceived, this);
- function firstConsoleMessageReceived() {
+ function firstConsoleMessageReceived(event) {
+ if (event && event.data.source === WebInspector.ConsoleMessage.MessageSource.Violation)
+ return;
WebInspector.multitargetConsoleModel.removeEventListener(
WebInspector.ConsoleModel.Events.MessageAdded, firstConsoleMessageReceived, this);
this.evaluateInConsole_('clickLink();', didClickLink.bind(this));
@@ -531,7 +539,7 @@
function didClickLink() {
// Check that there are no new messages(command is not a message).
- this.assertEquals(3, WebInspector.multitargetConsoleModel.messages().length);
+ this.assertEquals(3, filteredMessages().length);
this.evaluateInConsole_('history.back();', didNavigateBack.bind(this));
}
@@ -541,7 +549,7 @@
}
function didCompleteNavigation() {
- this.assertEquals(7, WebInspector.multitargetConsoleModel.messages().length);
+ this.assertEquals(7, filteredMessages().length);
this.releaseControl();
}

Powered by Google App Engine
This is Rietveld 408576698