Index: LayoutTests/http/tests/inspector/console-test.js |
diff --git a/LayoutTests/http/tests/inspector/console-test.js b/LayoutTests/http/tests/inspector/console-test.js |
index 3160c8e977b35bdeb874d3e77fe98aa280012d8a..751681158cc6e000fc6487561356e8f058ef8a51 100644 |
--- a/LayoutTests/http/tests/inspector/console-test.js |
+++ b/LayoutTests/http/tests/inspector/console-test.js |
@@ -156,4 +156,16 @@ InspectorTest.waitUntilMessageReceived = function(callback) |
InspectorTest.addSniffer(WebInspector.console, "addMessage", callback, false); |
} |
+InspectorTest.waitUntilNthMessageReceived = function(count, callback) |
+{ |
+ function override() |
+ { |
+ if (--count === 0) |
+ InspectorTest.safeWrap(callback)(); |
+ else |
+ InspectorTest.addSniffer(WebInspector.console, "addMessage", override, false); |
+ } |
+ InspectorTest.addSniffer(WebInspector.console, "addMessage", override, false); |
+} |
+ |
} |