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

Side by Side Diff: chrome/test/data/media/eme_player_js/globals.js

Issue 308553002: Integrate browser tests with new EME player. (Closed) Base URL: http://git.chromium.org/chromium/src.git@eme_player
Patch Set: Add support for FileIO and LoadSession test cases Created 6 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This file contains global constant variables used by the application. 5 // This file contains global constant variables used by the application.
6 6
7 // Heart beat message header. 7 // Heart beat message header.
8 var HEART_BEAT_HEADER = 'HEARTBEAT'; 8 var HEART_BEAT_HEADER = 'HEARTBEAT';
9 9
10 // Default key used to encrypt many media files used in browser tests. 10 // Default key used to encrypt many media files used in browser tests.
11 var KEY = new Uint8Array([0xeb, 0xdd, 0x62, 0xf1, 0x68, 0x14, 0xd2, 0x7b, 11 var KEY = new Uint8Array([0xeb, 0xdd, 0x62, 0xf1, 0x68, 0x14, 0xd2, 0x7b,
12 0x68, 0xef, 0x12, 0x2a, 0xfc, 0xe4, 0xae, 0x3c]); 12 0x68, 0xef, 0x12, 0x2a, 0xfc, 0xe4, 0xae, 0x3c]);
13 13
14 var DEFAULT_LICENSE_SERVER = document.location.origin + '/license_server'; 14 var DEFAULT_LICENSE_SERVER = document.location.origin + '/license_server';
15 15
16 var DEFAULT_MEDIA_FILE = 'http://shadi.kir/alcatraz/Chrome_44-enc_av.webm'; 16 var DEFAULT_MEDIA_FILE = 'http://shadi.kir/alcatraz/Chrome_44-enc_av.webm';
17 17
18 // Key ID used for init data. 18 // Key ID used for init data.
19 var KEY_ID = '0123456789012345'; 19 var KEY_ID = '0123456789012345';
20 20
21 // Unique strings to identify test result expectations.
22 var KEY_ERROR = 'KEY_ERROR';
23 var FILE_IO_TEST_RESULT_HEADER = 'FILEIOTESTRESULT';
24 var FILE_IO_TEST_SUCCESS = 'FILE_IO_TEST_SUCCESS';
25 var PREFIXED_API_LOAD_SESSION_HEADER = "LOAD_SESSION|";
26
21 // Available EME key systems to use. 27 // Available EME key systems to use.
22 var PREFIXED_CLEARKEY = 'webkit-org.w3.clearkey'; 28 var PREFIXED_CLEARKEY = 'webkit-org.w3.clearkey';
23 var CLEARKEY = 'org.w3.clearkey'; 29 var CLEARKEY = 'org.w3.clearkey';
24 var EXTERNAL_CLEARKEY = 'org.chromium.externalclearkey'; 30 var EXTERNAL_CLEARKEY = 'org.chromium.externalclearkey';
25 var WIDEVINE_KEYSYSTEM = 'com.widevine.alpha'; 31 var WIDEVINE_KEYSYSTEM = 'com.widevine.alpha';
32 var FILE_IO_TEST_KEYSYSTEM = 'org.chromium.externalclearkey.fileiotest';
26 33
27 // Key system name:value map to show on the document page. 34 // Key system name:value map to show on the document page.
28 var KEY_SYSTEMS = { 35 var KEY_SYSTEMS = {
29 'Widevine': WIDEVINE_KEYSYSTEM, 36 'Widevine': WIDEVINE_KEYSYSTEM,
30 'Clearkey': CLEARKEY, 37 'Clearkey': CLEARKEY,
31 'External Clearkey': EXTERNAL_CLEARKEY 38 'External Clearkey': EXTERNAL_CLEARKEY
32 }; 39 };
33 40
34 // General WebM and MP4 name:content_type map to show on the document page. 41 // General WebM and MP4 name:content_type map to show on the document page.
35 var MEDIA_TYPES = { 42 var MEDIA_TYPES = {
36 'WebM - Audio Video': 'video/webm; codecs="vorbis, vp8"', 43 'WebM - Audio Video': 'video/webm; codecs="vorbis, vp8"',
37 'WebM - Video Only': 'video/webm; codecs="vp8"', 44 'WebM - Video Only': 'video/webm; codecs="vp8"',
38 'WebM - Audio Only': 'video/webm; codecs="vorbis"', 45 'WebM - Audio Only': 'video/webm; codecs="vorbis"',
39 'MP4 - Video Only': 'video/mp4; codecs="avc1.4D4041"', 46 'MP4 - Video Only': 'video/mp4; codecs="avc1.4D4041"',
40 'MP4 - Audio Only': 'audio/mp4; codecs="mp4a.40.2"' 47 'MP4 - Audio Only': 'audio/mp4; codecs="mp4a.40.2"'
41 }; 48 };
42 49
43 // Update the EME versions list by checking runtime support by the browser. 50 // Update the EME versions list by checking runtime support by the browser.
44 var EME_VERSIONS_OPTIONS = {}; 51 var EME_VERSIONS_OPTIONS = {};
45 var video = document.createElement('video'); 52 if (document.createElement('video').webkitAddKey)
46 if (video.webkitAddKey)
47 EME_VERSIONS_OPTIONS['Prefixed EME (v 0.1b)'] = 'true'; 53 EME_VERSIONS_OPTIONS['Prefixed EME (v 0.1b)'] = 'true';
48 if (video.setMediaKeys) 54 if (document.createElement('video').setMediaKeys)
49 EME_VERSIONS_OPTIONS['Unprefixed EME (Working draft)'] = 'false'; 55 EME_VERSIONS_OPTIONS['Unprefixed EME (Working draft)'] = 'false';
jrummell 2014/06/13 21:53:59 What happens if only unprefixed EME is available?
shadi 2014/06/19 01:07:04 It will only show the option of unprefixed EME. Th
50 56
51 // Global document elements ID's. 57 // Global document elements ID's.
52 var VIDEO_ELEMENT_ID = 'video'; 58 var VIDEO_ELEMENT_ID = 'video';
53 var MEDIA_FILE_ELEMENT_ID = 'mediaFile'; 59 var MEDIA_FILE_ELEMENT_ID = 'mediaFile';
54 var LICENSE_SERVER_ELEMENT_ID = 'licenseServer'; 60 var LICENSE_SERVER_ELEMENT_ID = 'licenseServer';
55 var KEYSYSTEM_ELEMENT_ID = 'keySystemList'; 61 var KEYSYSTEM_ELEMENT_ID = 'keySystemList';
56 var MEDIA_TYPE_ELEMENT_ID = 'mediaTypeList'; 62 var MEDIA_TYPE_ELEMENT_ID = 'mediaTypeList';
57 var USE_SRC_ELEMENT_ID = 'useSRC'; 63 var USE_SRC_ELEMENT_ID = 'useSRC';
58 var USE_PREFIXED_EME_ID = 'usePrefixedEME'; 64 var USE_PREFIXED_EME_ID = 'usePrefixedEME';
59 65
60 // These variables get updated every second, so better to have global pointers. 66 // These variables get updated every second, so better to have global pointers.
61 var decodedFPSElement = document.getElementById('decodedFPS'); 67 var decodedFPSElement = document.getElementById('decodedFPS');
62 var droppedFPSElement = document.getElementById('droppedFPS'); 68 var droppedFPSElement = document.getElementById('droppedFPS');
63 var droppedFramesElement = document.getElementById('droppedFrames'); 69 var droppedFramesElement = document.getElementById('droppedFrames');
64 var docLogs = document.getElementById('logs'); 70 var docLogs = document.getElementById('logs');
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698