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

Side by Side Diff: LayoutTests/media/encrypted-media/encrypted-media-v2-syntax-expected.txt

Issue 182453005: Encrypted Media: Convert unprefixed syntax layout test to use testharness.js. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 9 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 This tests the basic API of MediaKeys and MediaKeySession. 1 This is a testharness.js-based test.
2 PASS Test MediaKeys constructor exceptions.
3 PASS Test MediaKeys constructor.
4 PASS Test MediaKeys createSession() type errors: ''.
5 PASS Test MediaKeys createSession() type errors: ''.
6 PASS Test MediaKeys createSession() type errors: ''.
7 PASS Test MediaKeys createSession() type errors: ''.
8 PASS Test MediaKeys createSession() type errors: 'video/webm'.
9 PASS Test MediaKeys createSession() type errors: '[object Uint8Array]'.
10 PASS Test MediaKeys createSession() type errors: '[object Uint8Array]'.
11 PASS Test MediaKeys createSession() invalid access errors: 'video/webm', ''.
12 PASS Test MediaKeys createSession() invalid access errors: 'video/webm', ''.
13 PASS Test MediaKeys createSession() invalid access errors: 'video/webm', ''.
14 PASS Test MediaKeys createSession() invalid access errors: 'video/webm', '[objec t Uint8Array]'.
15 PASS Test MediaKeys createSession() invalid access errors: '', '[object Uint8Arr ay]'.
16 PASS Test MediaKeys createSession() not supported errors: '', '[object Uint8Arra y]'.
17 PASS Test MediaKeys createSession() not supported errors: '', '[object Uint8Arra y]'.
18 PASS Test MediaKeys createSession() not supported errors: 'unsupported', '[objec t Uint8Array]'.
19 PASS Test MediaKeys createSession() not supported errors: 'Video/webm', '[object Uint8Array]'.
20 PASS Test MediaKeySession creation.
21 PASS Test MediaKeySession update() type errors: ''.
22 PASS Test MediaKeySession update() invalid access errors: ''.
23 PASS Test MediaKeySession update() invalid access errors: ''.
24 PASS Test MediaKeySession update() invalid access errors: ''.
25 PASS Test MediaKeySession update() invalid access errors: '[object Uint8Array]'.
26 PASS Test MediaKeySession update().
27 PASS Test MediaKeySession release().
28 Harness: the test ran to completion.
2 29
3 Test MediaKeys.
4 EXPECTED (typeof window.MediaKeys == 'function') OK
5 TEST(new MediaKeys("")) THROWS(DOMException.INVALID_ACCESS_ERR: Failed to constr uct 'MediaKeys': The key system provided is invalid.) OK
6 TEST(new MediaKeys("unsupported")) THROWS(DOMException.NOT_SUPPORTED_ERR: Failed to construct 'MediaKeys': The 'unsupported' key system is not supported.) OK
7 RUN(mediaKeys = new MediaKeys("org.w3.clearkey"))
8 EXPECTED (typeof mediaKeys == 'object') OK
9 EXPECTED (mediaKeys.keySystem == 'org.w3.clearkey') OK
10 EXPECTED (typeof mediaKeys.createSession == 'function') OK
11 TEST(mediaKeys.createSession()) THROWS("TypeError: Failed to execute 'createSess ion' on 'MediaKeys': 2 arguments required, but only 0 present.") OK
12 TEST(mediaKeys.createSession("")) THROWS("TypeError: Failed to execute 'createSe ssion' on 'MediaKeys': 2 arguments required, but only 1 present.") OK
13 TEST(mediaKeys.createSession("video/webm")) THROWS("TypeError: Failed to execute 'createSession' on 'MediaKeys': 2 arguments required, but only 1 present.") OK
14 TEST(mediaKeys.createSession("", new Uint8Array(1))) THROWS(DOMException.INVALID _ACCESS_ERR: Failed to execute 'createSession' on 'MediaKeys': The contentType p rovided ('') is empty.) OK
15 TEST(mediaKeys.createSession("video/webm", null)) THROWS(DOMException.INVALID_AC CESS_ERR: Failed to execute 'createSession' on 'MediaKeys': The initData provide d is null or empty.) OK
16 TEST(mediaKeys.createSession("video/webm", new Uint8Array(0))) THROWS(DOMExcepti on.INVALID_ACCESS_ERR: Failed to execute 'createSession' on 'MediaKeys': The ini tData provided is null or empty.) OK
17 TEST(mediaKeys.createSession("unsupported/type", new Uint8Array(1))) THROWS(DOME xception.NOT_SUPPORTED_ERR: Failed to execute 'createSession' on 'MediaKeys': Th e type provided ('unsupported/type') is unsupported.) OK
18
19 Test MediaKeySession.
20 RUN(mediaKeySession = mediaKeys.createSession("video/webm", initData))
21 EXPECTED (typeof mediaKeySession == 'object') OK
22 EXPECTED (typeof mediaKeySession.addEventListener == 'function') OK
23 EXPECTED (typeof mediaKeySession.update == 'function') OK
24 EXPECTED (mediaKeySession.error == 'null') OK
25 EXPECTED (mediaKeySession.keySystem == 'org.w3.clearkey') OK
26 EXPECTED (mediaKeySession.sessionId != 'null') OK
27 EXPECTED (mediaKeySession.onwebkitkeyadded == 'null') OK
28 EXPECTED (mediaKeySession.onwebkitkeyerror == 'null') OK
29 EXPECTED (mediaKeySession.onwebkitkeymessage == 'null') OK
30 TEST(mediaKeySession.update()) THROWS("TypeError: Failed to execute 'update' on 'MediaKeySession': 1 argument required, but only 0 present.") OK
31 TEST(mediaKeySession.update(null)) THROWS(DOMException.INVALID_ACCESS_ERR: Faile d to execute 'update' on 'MediaKeySession': The response argument provided is in valid.) OK
32 RUN(mediaKeySession.update(new Uint8Array(1)))
33 RUN(mediaKeySession.release())
34 END OF TEST
35
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698