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

Unified Diff: content/test/data/media/encrypted_media_player.html

Issue 11753017: Fix onKeyAdded check causing flakiness in the tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Enabling disabled tests Created 7 years, 12 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
« no previous file with comments | « content/browser/encrypted_media_browsertest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/data/media/encrypted_media_player.html
diff --git a/content/test/data/media/encrypted_media_player.html b/content/test/data/media/encrypted_media_player.html
index 8c7d0cd24b729f4bfc5bf04c97f00faa88c4f15b..bfff39bc2810274add2ae06e8dd66c8601a6412f 100644
--- a/content/test/data/media/encrypted_media_player.html
+++ b/content/test/data/media/encrypted_media_player.html
@@ -10,11 +10,12 @@
var video = document.querySelector('video');
function onTimeUpdate() {
- // webkitkeyadded should have been fired before playback.
- if (!video.receivedKeyAdded)
- failTest('Key added event not received.');
if (video.currentTime < 1)
return;
+ // keyadded may be fired around the start of playback; check for it
+ // after a delay to avoid timing issues.
+ if (!video.receivedKeyAdded)
+ failTest('Key added event not received.');
if (video.isHeartbeatExpected && !video.receivedHeartbeat)
failTest('Heartbeat keymessage event not received.');
video.removeEventListener('ended', failTest);
« no previous file with comments | « content/browser/encrypted_media_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698