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

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

Issue 132823005: Schedule session initialization in MediaKeys. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@rename_close_gkr
Patch Set: Created 6 years, 11 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 tests the basic API of MediaKeys and MediaKeySession.
2 2
3 Test MediaKeys. 3 Test MediaKeys.
4 EXPECTED (typeof window.MediaKeys == 'function') OK 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 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 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")) 7 RUN(mediaKeys = new MediaKeys("org.w3.clearkey"))
8 EXPECTED (typeof mediaKeys == 'object') OK 8 EXPECTED (typeof mediaKeys == 'object') OK
9 EXPECTED (mediaKeys.keySystem == 'org.w3.clearkey') OK 9 EXPECTED (mediaKeys.keySystem == 'org.w3.clearkey') OK
10 EXPECTED (typeof mediaKeys.createSession == 'function') OK 10 EXPECTED (typeof mediaKeys.createSession == 'function') OK
11 TEST(mediaKeys.createSession("", new Uint8Array(1))) THROWS(DOMException.INVALID _ACCESS_ERR: Failed to execute 'createSession' on 'MediaKeys': The type provided is empty, but initData is not empty.) OK 11 TEST(mediaKeys.createSession("")) THROWS(DOMException.INVALID_ACCESS_ERR: Failed to execute 'createSession' on 'MediaKeys': The type or initData provided is emp ty or null.) OK
ddorwin 2014/01/13 20:20:57 MediaKeys.idl needs to be updated. This should be
xhwang 2014/01/14 04:04:11 Done.
12 TEST(mediaKeys.createSession("unsupported/type")) THROWS(DOMException.NOT_SUPPOR TED_ERR: Failed to execute 'createSession' on 'MediaKeys': The type provided ('u nsupported/type') is unsupported.) OK 12 TEST(mediaKeys.createSession("", new Uint8Array(1))) THROWS(DOMException.INVALID _ACCESS_ERR: Failed to execute 'createSession' on 'MediaKeys': The type or initD ata provided is empty or null.) OK
ddorwin 2014/01/13 20:20:57 Test for null too.
xhwang 2014/01/14 04:04:11 Done.
13 TEST(mediaKeys.createSession("video/webm", null)) THROWS(DOMException.INVALID_AC CESS_ERR: Failed to execute 'createSession' on 'MediaKeys': The type or initData provided is empty or null.) OK
ddorwin 2014/01/13 20:20:57 We can also check for an empty initData array.
xhwang 2014/01/14 04:04:11 Done.
14 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
13 15
14 Test MediaKeySession. 16 Test MediaKeySession.
15 RUN(mediaKeySession = mediaKeys.createSession("video/webm", initData)) 17 RUN(mediaKeySession = mediaKeys.createSession("video/webm", initData))
16 EXPECTED (typeof mediaKeySession == 'object') OK 18 EXPECTED (typeof mediaKeySession == 'object') OK
17 EXPECTED (typeof mediaKeySession.addEventListener == 'function') OK 19 EXPECTED (typeof mediaKeySession.addEventListener == 'function') OK
18 EXPECTED (typeof mediaKeySession.update == 'function') OK 20 EXPECTED (typeof mediaKeySession.update == 'function') OK
19 EXPECTED (mediaKeySession.error == 'null') OK 21 EXPECTED (mediaKeySession.error == 'null') OK
20 EXPECTED (mediaKeySession.keySystem == 'org.w3.clearkey') OK 22 EXPECTED (mediaKeySession.keySystem == 'org.w3.clearkey') OK
21 EXPECTED (mediaKeySession.sessionId != 'null') OK 23 EXPECTED (mediaKeySession.sessionId != 'null') OK
22 EXPECTED (mediaKeySession.onwebkitkeyadded == 'null') OK 24 EXPECTED (mediaKeySession.onwebkitkeyadded == 'null') OK
23 EXPECTED (mediaKeySession.onwebkitkeyerror == 'null') OK 25 EXPECTED (mediaKeySession.onwebkitkeyerror == 'null') OK
24 EXPECTED (mediaKeySession.onwebkitkeymessage == 'null') OK 26 EXPECTED (mediaKeySession.onwebkitkeymessage == 'null') OK
25 TEST(mediaKeySession.update(null)) THROWS(DOMException.INVALID_ACCESS_ERR: Faile d to execute 'update' on 'MediaKeySession': The response argument provided is in valid.) OK 27 TEST(mediaKeySession.update(null)) THROWS(DOMException.INVALID_ACCESS_ERR: Faile d to execute 'update' on 'MediaKeySession': The response argument provided is in valid.) OK
ddorwin 2014/01/13 20:20:57 Include a valid test for update()?
xhwang 2014/01/14 04:04:11 Done.
26 END OF TEST 28 END OF TEST
ddorwin 2014/01/13 20:20:57 test release()
xhwang 2014/01/14 04:04:11 Added FIXME.
27 29
OLDNEW
« no previous file with comments | « LayoutTests/media/encrypted-media/encrypted-media-v2-syntax.html ('k') | Source/modules/encryptedmedia/MediaKeySession.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698