OLD | NEW |
1 | 1 |
2 Test presence of MediaController constructor, controller, and mediaGroup attribu
tes: | 2 Test presence of MediaController constructor, controller, and mediaGroup attribu
tes: |
3 EXPECTED (typeof(MediaController) != 'undefined') OK | 3 EXPECTED (typeof(MediaController) != 'undefined') OK |
4 EXPECTED (video.controller == 'null') OK | 4 EXPECTED (video.controller == 'null') OK |
5 EXPECTED (video.mediaGroup == '') OK | 5 EXPECTED (video.mediaGroup == '') OK |
6 | 6 |
7 Test that the presence of a mediaGroup attribute creates a controller: | 7 Test that the presence of a mediaGroup attribute creates a controller: |
8 EXPECTED (video2.mediaGroup == 'group') OK | 8 EXPECTED (video2.mediaGroup == 'group') OK |
9 EXPECTED (video2.controller != 'null') OK | 9 EXPECTED (video2.controller != 'null') OK |
10 | 10 |
11 Test that setting mediaGroup to an empty string removes the controller: | 11 Test that setting mediaGroup to an empty string removes the controller: |
12 RUN(video.mediaGroup = '') | 12 RUN(video.mediaGroup = '') |
13 EXPECTED (video.controller == 'null') OK | 13 EXPECTED (video.controller == 'null') OK |
14 | 14 |
15 Test manually creating and assigning a controller to a media element: | 15 Test manually creating and assigning a controller to a media element: |
16 RUN(controller = new MediaController()) | 16 RUN(controller = new MediaController()) |
17 RUN(video.controller = controller) | 17 RUN(video.controller = controller) |
18 EXPECTED (video.controller == '[object MediaController]') OK | 18 EXPECTED (video.controller == '[object MediaController]') OK |
19 | 19 |
20 Test assigning the wrong type to the controller attribute of a media element: | 20 Test assigning the wrong type to the controller attribute of a media element: |
21 TEST(video.controller = 42) THROWS("TypeError: Value is not of type MediaControl
ler") OK | 21 TEST(video.controller = 42) THROWS("TypeError: Failed to set the 'controller' pr
operty on 'HTMLMediaElement': The provided value is not of type 'MediaController
'.") OK |
22 EXPECTED (video.controller == '[object MediaController]') OK | 22 EXPECTED (video.controller == '[object MediaController]') OK |
23 | 23 |
24 Test assigning a null controller to a media element: | 24 Test assigning a null controller to a media element: |
25 RUN(video.controller = null) | 25 RUN(video.controller = null) |
26 EXPECTED (video.controller == 'null') OK | 26 EXPECTED (video.controller == 'null') OK |
27 | 27 |
28 Test that two media elements with the same mediaGroup have the same controller: | 28 Test that two media elements with the same mediaGroup have the same controller: |
29 RUN(video.mediaGroup = 'group') | 29 RUN(video.mediaGroup = 'group') |
30 RUN(video2.mediaGroup = 'group') | 30 RUN(video2.mediaGroup = 'group') |
31 EXPECTED (video.controller === video2.controller == 'true') OK | 31 EXPECTED (video.controller === video2.controller == 'true') OK |
| 32 |
| 33 Test that setting the controller clears the mediaGroup: |
| 34 EXPECTED (video.mediaGroup == 'group') OK |
| 35 RUN(video.controller = null) |
| 36 EXPECTED (video.controller == 'null') OK |
| 37 EXPECTED (video.hasAttribute('mediaGroup') == 'false') OK |
| 38 EXPECTED (video.mediaGroup == '') OK |
| 39 RUN(video.mediaGroup = 'group') |
| 40 EXPECTED (video.mediaGroup == 'group') OK |
| 41 RUN(video.controller = controller) |
| 42 EXPECTED (video.controller == '[object MediaController]') OK |
| 43 EXPECTED (video.hasAttribute('mediaGroup') == 'false') OK |
| 44 EXPECTED (video.mediaGroup == '') OK |
| 45 |
| 46 Test that setting the controller to undefined is treated as null: |
| 47 EXPECTED (video.controller != 'null') OK |
| 48 RUN(video.controller = undefined) |
| 49 EXPECTED (video.controller == 'null') OK |
32 END OF TEST | 50 END OF TEST |
33 | 51 |
OLD | NEW |