Commit f54d9736 authored by shadi@chromium.org's avatar shadi@chromium.org

Fix onKeyAdded check causing flakiness in the tests, and enabling relevant disabled test.


BUG=168252


Review URL: https://chromiumcodereview.appspot.com/11753017

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@175113 0039d316-1c4b-4281-b951-d872f2087c98
parent 6bf1321a
......@@ -129,7 +129,7 @@ IN_PROC_BROWSER_TEST_F(EncryptedMediaTest, InvalidKeySystem) {
"com.example.invalid", kExpected));
}
IN_PROC_BROWSER_TEST_P(EncryptedMediaTest, DISABLED_BasicPlayback_AudioOnly) {
IN_PROC_BROWSER_TEST_P(EncryptedMediaTest, BasicPlayback_AudioOnly) {
const string16 kExpected = ASCIIToUTF16("ENDED");
ASSERT_NO_FATAL_FAILURE(
TestSimplePlayback("bear-a-enc_a.webm", kWebMAudioOnly,
......
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment