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

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

Issue 212643002: Use [StrictTypeChecking] for HTMLMediaElement.setMediaKeys (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: nullable 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 | Annotate | Revision Log
OLDNEW
1 This tests setting MediaKeys on a video object. 1 This tests setting MediaKeys on a video object.
2 2
3 Test MediaKeys assignment. 3 Test MediaKeys assignment.
4 EXPECTED (video != 'null') OK 4 EXPECTED (video != 'null') OK
5 EXPECTED (video.mediaKeys == 'null') OK 5 EXPECTED (video.mediaKeys == 'null') OK
6 EXPECTED (typeof video.setMediaKeys == 'function') OK 6 EXPECTED (typeof video.setMediaKeys == 'function') OK
7 Try setting mediaKeys to null. 7 Try setting mediaKeys to null.
8 RUN(video.setMediaKeys(null)) 8 RUN(video.setMediaKeys(null))
9 EXPECTED (video.mediaKeys == 'null') OK 9 EXPECTED (video.mediaKeys == 'null') OK
10 Try setting mediaKeys to the wrong type of object.
11 TEST(video.setMediaKeys(new Date())) THROWS("TypeError: Failed to execute 'setMe diaKeys' on 'HTMLMediaElement': parameter 1 is not of type 'MediaKeys'.") OK
10 Create a MediaKeys object and assign it to video. 12 Create a MediaKeys object and assign it to video.
11 RUN(mediaKeys = new MediaKeys("org.w3.clearkey")) 13 RUN(mediaKeys = new MediaKeys("org.w3.clearkey"))
12 EXPECTED (mediaKeys != 'null') OK 14 EXPECTED (mediaKeys != 'null') OK
13 EXPECTED (mediaKeys.keySystem == 'org.w3.clearkey') OK 15 EXPECTED (mediaKeys.keySystem == 'org.w3.clearkey') OK
14 RUN(video.setMediaKeys(mediaKeys)) 16 RUN(video.setMediaKeys(mediaKeys))
15 EXPECTED (video.mediaKeys != 'null') OK 17 EXPECTED (video.mediaKeys != 'null') OK
16 EXPECTED (video.mediaKeys === '[object MediaKeys]') OK 18 EXPECTED (video.mediaKeys === '[object MediaKeys]') OK
17 Set it a second time. 19 Set it a second time.
18 RUN(video.setMediaKeys(mediaKeys)) 20 RUN(video.setMediaKeys(mediaKeys))
19 EXPECTED (video.mediaKeys != 'null') OK 21 EXPECTED (video.mediaKeys != 'null') OK
(...skipping 15 matching lines...) Expand all
35 EXPECTED (video.mediaKeys == 'null') OK 37 EXPECTED (video.mediaKeys == 'null') OK
36 Set it to null a second time. 38 Set it to null a second time.
37 RUN(video.setMediaKeys(null)) 39 RUN(video.setMediaKeys(null))
38 EXPECTED (video.mediaKeys == 'null') OK 40 EXPECTED (video.mediaKeys == 'null') OK
39 Set it back to first MediaKeys again. 41 Set it back to first MediaKeys again.
40 RUN(video.setMediaKeys(mediaKeys)) 42 RUN(video.setMediaKeys(mediaKeys))
41 EXPECTED (video.mediaKeys === '[object MediaKeys]') OK 43 EXPECTED (video.mediaKeys === '[object MediaKeys]') OK
42 EXPECTED (video.mediaKeys != '[object MediaKeys]') OK 44 EXPECTED (video.mediaKeys != '[object MediaKeys]') OK
43 END OF TEST 45 END OF TEST
44 46
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698