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

Unified Diff: LayoutTests/inspector/console/console-revoke-error.html

Issue 1306523002: LayoutTests: clean up flaky inspecor expectations based on the dahsboard history. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 4 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: LayoutTests/inspector/console/console-revoke-error.html
diff --git a/LayoutTests/inspector/console/console-revoke-error.html b/LayoutTests/inspector/console/console-revoke-error.html
index 3e13fd5b24236fc123209317b48e09996a8f83b3..fafe9a86733646c69833ede9af3d5049622029d0 100644
--- a/LayoutTests/inspector/console/console-revoke-error.html
+++ b/LayoutTests/inspector/console/console-revoke-error.html
@@ -25,33 +25,35 @@ function test()
InspectorTest.addResult("Creating promise");
InspectorTest.evaluateInPageWithTimeout("createPromises()");
+ var messageNumber = 0;
function messageAdded(event)
{
- InspectorTest.addResult("");
InspectorTest.addResult("Message added: " + event.data.level + " " + event.data.type);
+ if (++messageNumber < 3)
+ return;
+ messageNumber = 0;
+
+ InspectorTest.consoleModel.removeEventListener(WebInspector.ConsoleModel.Events.MessageAdded, messageAdded);
+ InspectorTest.addResult("");
InspectorTest.addResult("errors: " + InspectorTest.consoleModel.errors());
InspectorTest.addResult("revokedErrors: " + InspectorTest.consoleModel.revokedErrors());
- if (event.data.level === WebInspector.ConsoleMessage.MessageLevel.Error) {
- InspectorTest.consoleModel.removeEventListener(WebInspector.ConsoleModel.Events.MessageAdded, messageAdded);
- // Process array as a batch.
- setTimeout(function() {
- InspectorTest.consoleModel.addEventListener(WebInspector.ConsoleModel.Events.MessageUpdated, messageUpdated);
- InspectorTest.dumpConsoleClassesBrief();
- InspectorTest.addResult("");
- InspectorTest.addResult("Handling promise");
- InspectorTest.evaluateInPageWithTimeout("handleSomeRejections()");
- });
- }
+ // Process array as a batch.
+ InspectorTest.consoleModel.addEventListener(WebInspector.ConsoleModel.Events.MessageUpdated, messageUpdated);
+ InspectorTest.dumpConsoleClassesBrief();
+ InspectorTest.addResult("");
+ InspectorTest.addResult("Handling promise");
+ InspectorTest.evaluateInPageWithTimeout("handleSomeRejections()");
}
function messageUpdated()
{
- // Process array as a batch.
- setTimeout(function() {
- InspectorTest.dumpConsoleClassesBrief();
- InspectorTest.completeTest();
- });
+ if (++messageNumber < 2)
+ return;
+ InspectorTest.dumpConsoleClassesBrief();
+ InspectorTest.addResult("errors: " + InspectorTest.consoleModel.errors());
+ InspectorTest.addResult("revokedErrors: " + InspectorTest.consoleModel.revokedErrors());
+ InspectorTest.completeTest();
}
}

Powered by Google App Engine
This is Rietveld 408576698