OLD | NEW |
1 Tests TextTrackRegionList functionality: length, operator[], and getRegionById() | 1 Tests VTTRegionList functionality: length, operator[], and getRegionById() |
2 | 2 |
3 | 3 |
4 ** Implicit mode disabled and the regions attribute is null ** | 4 ** Implicit mode disabled and the regions attribute is null ** |
5 EXPECTED (testTrack.track.mode == 'disabled') OK | 5 EXPECTED (testTrack.track.mode == 'disabled') OK |
6 EXPECTED (testTrack.track.regions == 'null') OK | 6 EXPECTED (testTrack.track.regions == 'null') OK |
7 | 7 |
8 ** The regions attribute should be an empty TextTrackRegionList ** | 8 ** Test instanceof VTTRegionList ** |
| 9 EXPECTED (regions instanceof VTTRegionList == 'true') OK |
| 10 |
| 11 ** The regions attribute should be an empty VTTRegionList ** |
9 EXPECTED (regions != null == 'true') OK | 12 EXPECTED (regions != null == 'true') OK |
10 EXPECTED (regions.length == '0') OK | 13 EXPECTED (regions.length == '0') OK |
11 | 14 |
12 ** The default value of the track attribute of the region is null** | 15 ** The default value of the track attribute of the region is null** |
13 EXPECTED (region.track == 'null') OK | 16 EXPECTED (region.track == 'null') OK |
14 | 17 |
15 ** The addRegion() method properly updates the TextTrackRegionList object ** | 18 ** The addRegion() method properly updates the VTTRegionList object ** |
16 EXPECTED (regions.length == '1') OK | 19 EXPECTED (regions.length == '1') OK |
17 EXPECTED (regions[0] == region == 'true') OK | 20 EXPECTED (regions[0] == region == 'true') OK |
18 EXPECTED (regions[0].track == testTrack.track == 'true') OK | 21 EXPECTED (regions[0].track == testTrack.track == 'true') OK |
19 | 22 |
20 ** The track attribute should correctly reflect the track to which the region wa
s added to** | 23 ** The track attribute should correctly reflect the track to which the region wa
s added to** |
21 EXPECTED (region.track == testTrack.track == 'true') OK | 24 EXPECTED (region.track == testTrack.track == 'true') OK |
22 | 25 |
23 ** Adding a region with an existing id should update the existing region ** | 26 ** Adding a region with an existing id should update the existing region ** |
24 EXPECTED (regions[0].viewportAnchorX == '59') OK | 27 EXPECTED (regions[0].viewportAnchorX == '59') OK |
25 EXPECTED (regions[0].viewportAnchorY == '68') OK | 28 EXPECTED (regions[0].viewportAnchorY == '68') OK |
26 EXPECTED (regions[0].regionAnchorX == '20') OK | 29 EXPECTED (regions[0].regionAnchorX == '20') OK |
27 EXPECTED (regions[0].regionAnchorY == '30') OK | 30 EXPECTED (regions[0].regionAnchorY == '30') OK |
28 EXPECTED (regions[0].height == '5') OK | 31 EXPECTED (regions[0].height == '5') OK |
29 EXPECTED (regions[0].width == '87') OK | 32 EXPECTED (regions[0].width == '87') OK |
30 EXPECTED (regions[0].scroll == 'up') OK | 33 EXPECTED (regions[0].scroll == 'up') OK |
31 EXPECTED (regions[0] != updatedRegion == 'true') OK | 34 EXPECTED (regions[0] != updatedRegion == 'true') OK |
32 | 35 |
33 ** Add the region back and check if removeRegion() removes it properly ** | 36 ** Add the region back and check if removeRegion() removes it properly ** |
34 EXPECTED (regions.length == '1') OK | 37 EXPECTED (regions.length == '1') OK |
35 EXPECTED (regions.length == '0') OK | 38 EXPECTED (regions.length == '0') OK |
36 | 39 |
37 ** In case the region is not found, NotFoundError should be thrown ** | 40 ** In case the region is not found, NotFoundError should be thrown ** |
38 NotFoundError: An attempt was made to reference a Node in a context where it doe
s not exist. | 41 NotFoundError: An attempt was made to reference a Node in a context where it doe
s not exist. |
39 | 42 |
40 END OF TEST | 43 END OF TEST |
41 | 44 |
OLD | NEW |