OLD | NEW |
| (Empty) |
1 CONSOLE WARNING: The prefixed Encrypted Media Extensions APIs are deprecated. Pl
ease use 'navigator.requestMediaKeySystemAccess()' instead. | |
2 CONSOLE WARNING: The prefixed Encrypted Media Extensions APIs are deprecated. Pl
ease use 'navigator.requestMediaKeySystemAccess()' instead. | |
3 CONSOLE WARNING: The prefixed Encrypted Media Extensions APIs are deprecated. Pl
ease use 'navigator.requestMediaKeySystemAccess()' instead. | |
4 Tests invalid and valid syntaxes. | |
5 | |
6 Test calling functions with too few parameters. | |
7 TEST(video.webkitGenerateKeyRequest()) THROWS("TypeError: Failed to execute 'web
kitGenerateKeyRequest' on 'HTMLMediaElement': 1 argument required, but only 0 pr
esent.") OK | |
8 TEST(video.webkitAddKey()) THROWS("TypeError: Failed to execute 'webkitAddKey' o
n 'HTMLMediaElement': 2 arguments required, but only 0 present.") OK | |
9 TEST(video.webkitAddKey('webkit-org.w3.clearkey')) THROWS("TypeError: Failed to
execute 'webkitAddKey' on 'HTMLMediaElement': 2 arguments required, but only 1 p
resent.") OK | |
10 TEST(video.webkitCancelKeyRequest()) THROWS("TypeError: Failed to execute 'webki
tCancelKeyRequest' on 'HTMLMediaElement': 1 argument required, but only 0 presen
t.") OK | |
11 | |
12 Verify invalid key system parameter is caught before checking whether loading ha
s started. | |
13 EXPECTED (video.networkState == '0') OK | |
14 EXPECTED (video.currentSrc == '') OK | |
15 TEST(video.webkitGenerateKeyRequest('')) THROWS(DOMException.SYNTAX_ERR: Failed
to execute 'webkitGenerateKeyRequest' on 'HTMLMediaElement': The key system prov
ided is empty.) OK | |
16 TEST(video.webkitGenerateKeyRequest(null)) THROWS(DOMException.SYNTAX_ERR: Faile
d to execute 'webkitGenerateKeyRequest' on 'HTMLMediaElement': The key system pr
ovided is empty.) OK | |
17 TEST(video.webkitGenerateKeyRequest(undefined)) THROWS(DOMException.SYNTAX_ERR:
Failed to execute 'webkitGenerateKeyRequest' on 'HTMLMediaElement': The key syst
em provided is empty.) OK | |
18 TEST(video.webkitAddKey('', key)) THROWS(DOMException.SYNTAX_ERR: Failed to exec
ute 'webkitAddKey' on 'HTMLMediaElement': The key system provided is empty.) OK | |
19 TEST(video.webkitAddKey(null, key)) THROWS(DOMException.SYNTAX_ERR: Failed to ex
ecute 'webkitAddKey' on 'HTMLMediaElement': The key system provided is empty.) O
K | |
20 TEST(video.webkitAddKey(undefined, key)) THROWS(DOMException.SYNTAX_ERR: Failed
to execute 'webkitAddKey' on 'HTMLMediaElement': The key system provided is empt
y.) OK | |
21 TEST(video.webkitCancelKeyRequest('')) THROWS(DOMException.SYNTAX_ERR: Failed to
execute 'webkitCancelKeyRequest' on 'HTMLMediaElement': The key system provided
is empty.) OK | |
22 TEST(video.webkitCancelKeyRequest(null)) THROWS(DOMException.SYNTAX_ERR: Failed
to execute 'webkitCancelKeyRequest' on 'HTMLMediaElement': The key system provid
ed is empty.) OK | |
23 TEST(video.webkitCancelKeyRequest(undefined)) THROWS(DOMException.SYNTAX_ERR: Fa
iled to execute 'webkitCancelKeyRequest' on 'HTMLMediaElement': The key system p
rovided is empty.) OK | |
24 | |
25 null key is caught before load state is checked. | |
26 TEST(video.webkitAddKey('webkit-org.w3.clearkey', '')) THROWS(DOMException.SYNTA
X_ERR: Failed to execute 'webkitAddKey' on 'HTMLMediaElement': The key provided
is invalid.) OK | |
27 TEST(video.webkitAddKey('webkit-org.w3.clearkey', null)) THROWS(DOMException.SYN
TAX_ERR: Failed to execute 'webkitAddKey' on 'HTMLMediaElement': The key provide
d is invalid.) OK | |
28 TEST(video.webkitAddKey('webkit-org.w3.clearkey', undefined)) THROWS(DOMExceptio
n.SYNTAX_ERR: Failed to execute 'webkitAddKey' on 'HTMLMediaElement': The key pr
ovided is invalid.) OK | |
29 | |
30 0-length key is caught before load state is checked. | |
31 TEST(video.webkitAddKey('webkit-org.w3.clearkey', new Uint8Array())) THROWS(DOME
xception.TYPE_MISMATCH_ERR: Failed to execute 'webkitAddKey' on 'HTMLMediaElemen
t': The key provided is invalid.) OK | |
32 | |
33 Key system validity is not checked before loading. | |
34 TEST(video.webkitGenerateKeyRequest('com.example.invalid')) THROWS(DOMException.
INVALID_STATE_ERR: Failed to execute 'webkitGenerateKeyRequest' on 'HTMLMediaEle
ment': No media has been loaded.) OK | |
35 TEST(video.webkitAddKey('com.example.invalid', key)) THROWS(DOMException.INVALID
_STATE_ERR: Failed to execute 'webkitAddKey' on 'HTMLMediaElement': No media has
been loaded.) OK | |
36 TEST(video.webkitCancelKeyRequest('com.example.invalid')) THROWS(DOMException.IN
VALID_STATE_ERR: Failed to execute 'webkitCancelKeyRequest' on 'HTMLMediaElement
': No media has been loaded.) OK | |
37 | |
38 EVENT(loadstart) | |
39 Verify valid syntaxes do not throw. | |
40 EXPECTED (video.networkState == '2') OK | |
41 EXPECTED (video.currentSrc != '') OK | |
42 RUN(video.webkitGenerateKeyRequest('webkit-org.w3.clearkey')) | |
43 RUN(video.webkitGenerateKeyRequest('webkit-org.w3.clearkey', initData)) | |
44 RUN(video.webkitAddKey('webkit-org.w3.clearkey', key)) | |
45 RUN(video.webkitAddKey('webkit-org.w3.clearkey', key, 'session')) | |
46 RUN(video.webkitAddKey('webkit-org.w3.clearkey', key, initData)) | |
47 RUN(video.webkitAddKey('webkit-org.w3.clearkey', key, initData, 'session')) | |
48 RUN(video.webkitCancelKeyRequest('webkit-org.w3.clearkey')) | |
49 RUN(video.webkitCancelKeyRequest('webkit-org.w3.clearkey', 'session')) | |
50 | |
51 Unsupported key systems result in NOT_SUPPORTED_ERR. | |
52 TEST(video.webkitGenerateKeyRequest('com.example.invalid')) THROWS(DOMException.
NOT_SUPPORTED_ERR: Failed to execute 'webkitGenerateKeyRequest' on 'HTMLMediaEle
ment': The key system provided ('com.example.invalid') is not supported.) OK | |
53 TEST(video.webkitAddKey('com.example.invalid', key)) THROWS(DOMException.NOT_SUP
PORTED_ERR: Failed to execute 'webkitAddKey' on 'HTMLMediaElement': The key syst
em provided ('com.example.invalid') is not supported.) OK | |
54 TEST(video.webkitCancelKeyRequest('com.example.invalid')) THROWS(DOMException.NO
T_SUPPORTED_ERR: Failed to execute 'webkitCancelKeyRequest' on 'HTMLMediaElement
': The key system provided ('com.example.invalid') is not supported.) OK | |
55 END OF TEST | |
56 | |
OLD | NEW |