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

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: 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 | « no previous file | 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..3cf753dab506f72083ec7fdce0b7c56540001c15 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;
+ // webkitkeyadded happens right before playback, we check for it after
ddorwin 2013/01/03 23:29:55 I suggest something like: // keyadded may be fired
shadi 2013/01/04 00:09:19 Done.
+ // time update 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 | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698