OLD | NEW |
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 Loading... |
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 |
OLD | NEW |