Chromium Code Reviews| 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); |