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

Unified Diff: LayoutTests/media/encrypted-media/encrypted-media-lifetime-reload.html

Issue 634243005: Improve reliability of EME tests (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 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 | LayoutTests/media/encrypted-media/encrypted-media-playback-setmediakeys-after-src.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/media/encrypted-media/encrypted-media-lifetime-reload.html
diff --git a/LayoutTests/media/encrypted-media/encrypted-media-lifetime-reload.html b/LayoutTests/media/encrypted-media/encrypted-media-lifetime-reload.html
index 1e8ac051f29bff8c7fa26aada89ab331fc87000e..cfaafb8b282e3614b96fc1b6eaccc26d152ff68b 100644
--- a/LayoutTests/media/encrypted-media/encrypted-media-lifetime-reload.html
+++ b/LayoutTests/media/encrypted-media/encrypted-media-lifetime-reload.html
@@ -15,8 +15,8 @@
{
var video = document.getElementById('testVideo');
var mediaKeySession = null;
- var isSessionCreated = false;
var sessionReadyReceived = false;
+ var encryptedEventCount = 0;
var rawKey = new Uint8Array([0xeb, 0xdd, 0x62, 0xf1, 0x68, 0x14, 0xd2, 0x7b,
0x68, 0xef, 0x12, 0x2a, 0xfc, 0xe4, 0xae, 0x3c]);
@@ -28,10 +28,12 @@
assert_equals(event.type, 'encrypted');
// The same decryption key is shared by all streams so only
- // create a shared session once.
- if (isSessionCreated)
+ // create a shared session once. To avoid timing issues with
ddorwin 2014/10/15 23:36:20 Any idea what "shared" means?
jrummell 2014/10/16 00:43:45 Changed.
+ // the "message" event being received before the second
ddorwin 2014/10/15 23:36:20 We should be specific about this being related to
jrummell 2014/10/16 00:43:45 Done.
+ // "encrypted" event, only create the session on the second
+ // event.
ddorwin 2014/10/15 23:36:20 ...This also ensures we see both events. Maybe we
jrummell 2014/10/16 00:43:45 Comment added. expected.txt file ensures it fails
+ if (++encryptedEventCount != 2)
return;
- isSessionCreated = true;
mediaKeySession = video.mediaKeys.createSession();
waitForEventAndRunStep('message', mediaKeySession, onMessage, test);
« no previous file with comments | « no previous file | LayoutTests/media/encrypted-media/encrypted-media-playback-setmediakeys-after-src.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698