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

Unified Diff: LayoutTests/http/tests/media/encrypted-media/encrypted-media-encrypted-event-different-origin.html

Issue 1308853005: Add logging to encrypted-media-encrypted-event-different-origin.html (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 4 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: LayoutTests/http/tests/media/encrypted-media/encrypted-media-encrypted-event-different-origin.html
diff --git a/LayoutTests/http/tests/media/encrypted-media/encrypted-media-encrypted-event-different-origin.html b/LayoutTests/http/tests/media/encrypted-media/encrypted-media-encrypted-event-different-origin.html
index 226082aebdc24c83e4b425ef532f2d00c3c844fb..de3962f06344e5a4aecb38d8551ced20a6ab3824 100644
--- a/LayoutTests/http/tests/media/encrypted-media/encrypted-media-encrypted-event-different-origin.html
+++ b/LayoutTests/http/tests/media/encrypted-media/encrypted-media-encrypted-event-different-origin.html
@@ -14,8 +14,18 @@
var video = document.getElementById('testVideo');
var encryptedEventCount = 0;
+ function logMessage(msg) {
+ var date = new Date();
+ var hours = ('0' + date.getHours()).slice(-2);
+ var minutes = ('0' + date.getMinutes()).slice(-2);
+ var secs = ('0' + date.getSeconds()).slice(-2);
+ var milliSecs = ('00' + date.getMilliseconds()).slice(-3);
+ console.log(hours + ':' + minutes + ':' + secs + '.' + milliSecs + ': ' + msg);
+ };
+
function onEncrypted(event)
{
+ logMessage('onEncrypted');
assert_equals(event.target, video);
assert_true(event instanceof window.MediaEncryptedEvent);
assert_equals(event.type, 'encrypted');
@@ -27,10 +37,13 @@
// Both the audio and the video tracks have initData,
// so finish once both events are received.
- if (++encryptedEventCount == 2)
+ if (++encryptedEventCount == 2) {
+ logMessage('done');
test.done();
+ }
}
+ logMessage('starting');
navigator.requestMediaKeySystemAccess('org.w3.clearkey', [{}]).then(function(access) {
return access.createMediaKeys();
}).then(function(mediaKeys) {
@@ -39,6 +52,7 @@
}).then(function(result) {
// Verify that the current origin is different than what
// we use for the content.
+ logMessage('setting src');
assert_equals(document.origin, 'http://127.0.0.1:8000');
video.src = 'http://127.0.0.1:8080/media/encrypted-media/test-encrypted.webm';
video.play();
« 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