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

Unified Diff: LayoutTests/media/video-test.js

Issue 17395006: Fix LayoutTests that assume canplay, playing, and canplaythrough will only fire once. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 6 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/media/video-test.js
diff --git a/LayoutTests/media/video-test.js b/LayoutTests/media/video-test.js
index 805c7a5419df5ac5244c87345acb6e00df7455fb..986f000d2ac50b776497f0eeaeb39b48105f2817 100644
--- a/LayoutTests/media/video-test.js
+++ b/LayoutTests/media/video-test.js
@@ -148,17 +148,17 @@ function run(testFuncString)
}
}
-function waitForEventOnce(eventName, func, endit)
+function waitForEventOnce(eventName, func, endit, doNotLog)
{
- waitForEvent(eventName, func, endit, true)
+ waitForEvent(eventName, func, endit, true, null, doNotLog)
}
function waitForEventAndEnd(eventName, funcString)
{
- waitForEvent(eventName, funcString, true)
+ waitForEvent(eventName, funcString, true, false, null, false)
}
-function waitForEvent(eventName, func, endit, oneTimeOnly, element)
+function waitForEvent(eventName, func, endit, oneTimeOnly, element, doNotLog)
{
if (!element)
element = mediaElement;
@@ -168,7 +168,8 @@ function waitForEvent(eventName, func, endit, oneTimeOnly, element)
if (oneTimeOnly)
element.removeEventListener(eventName, _eventCallback, true);
- consoleWrite("EVENT(" + eventName + ")");
+ if (!doNotLog)
+ consoleWrite("EVENT(" + eventName + ")");
if (func)
func(event);
« LayoutTests/media/video-seeking-expected.txt ('K') | « LayoutTests/media/video-seeking-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698