OLD | NEW |
1 Tests the constructor and mutation of TextTrackRegion. | 1 Tests the constructor and mutation of TextTrackRegion. |
2 | 2 |
3 undefined FAIL | 3 ** Test the default indexs of a region. ** |
| 4 EXPECTED (region.track == 'null') OK |
| 5 EXPECTED (region.scroll == '') OK |
| 6 EXPECTED (region.viewportAnchorX == '0') OK |
| 7 EXPECTED (region.viewportAnchorY == '100') OK |
| 8 EXPECTED (region.regionAnchorX == '0') OK |
| 9 EXPECTED (region.regionAnchorY == '100') OK |
| 10 EXPECTED (region.height == '3') OK |
| 11 EXPECTED (region.width == '100') OK |
| 12 |
| 13 ** Test that incorrect mutation keeps previous valid values. ** |
| 14 RUN(region.scroll = 'invalid-scroll-value') |
| 15 SyntaxError: An invalid or illegal string was specified. |
| 16 EXPECTED (region.scroll == '') OK |
| 17 |
| 18 Invalid percentage value: -1 |
| 19 RUN(region.viewportAnchorX = invalidPercentageValues[index]) |
| 20 IndexSizeError: Index or size was negative, or greater than the allowed value. |
| 21 EXPECTED (region.viewportAnchorX == '0') OK |
| 22 RUN(region.viewportAnchorY = invalidPercentageValues[index]) |
| 23 IndexSizeError: Index or size was negative, or greater than the allowed value. |
| 24 EXPECTED (region.viewportAnchorY == '100') OK |
| 25 RUN(region.regionAnchorX = invalidPercentageValues[index]) |
| 26 IndexSizeError: Index or size was negative, or greater than the allowed value. |
| 27 EXPECTED (region.regionAnchorX == '0') OK |
| 28 RUN(region.regionAnchorY = invalidPercentageValues[index]) |
| 29 IndexSizeError: Index or size was negative, or greater than the allowed value. |
| 30 EXPECTED (region.regionAnchorY == '100') OK |
| 31 RUN(region.width = invalidPercentageValues[index]) |
| 32 IndexSizeError: Index or size was negative, or greater than the allowed value. |
| 33 EXPECTED (region.width == '100') OK |
| 34 |
| 35 Invalid percentage value: 101 |
| 36 RUN(region.viewportAnchorX = invalidPercentageValues[index]) |
| 37 IndexSizeError: Index or size was negative, or greater than the allowed value. |
| 38 EXPECTED (region.viewportAnchorX == '0') OK |
| 39 RUN(region.viewportAnchorY = invalidPercentageValues[index]) |
| 40 IndexSizeError: Index or size was negative, or greater than the allowed value. |
| 41 EXPECTED (region.viewportAnchorY == '100') OK |
| 42 RUN(region.regionAnchorX = invalidPercentageValues[index]) |
| 43 IndexSizeError: Index or size was negative, or greater than the allowed value. |
| 44 EXPECTED (region.regionAnchorX == '0') OK |
| 45 RUN(region.regionAnchorY = invalidPercentageValues[index]) |
| 46 IndexSizeError: Index or size was negative, or greater than the allowed value. |
| 47 EXPECTED (region.regionAnchorY == '100') OK |
| 48 RUN(region.width = invalidPercentageValues[index]) |
| 49 IndexSizeError: Index or size was negative, or greater than the allowed value. |
| 50 EXPECTED (region.width == '100') OK |
| 51 |
| 52 Invalid percentage value: -Infinity |
| 53 RUN(region.viewportAnchorX = invalidPercentageValues[index]) |
| 54 TypeError: Type error |
| 55 EXPECTED (region.viewportAnchorX == '0') OK |
| 56 RUN(region.viewportAnchorY = invalidPercentageValues[index]) |
| 57 TypeError: Type error |
| 58 EXPECTED (region.viewportAnchorY == '100') OK |
| 59 RUN(region.regionAnchorX = invalidPercentageValues[index]) |
| 60 TypeError: Type error |
| 61 EXPECTED (region.regionAnchorX == '0') OK |
| 62 RUN(region.regionAnchorY = invalidPercentageValues[index]) |
| 63 TypeError: Type error |
| 64 EXPECTED (region.regionAnchorY == '100') OK |
| 65 RUN(region.width = invalidPercentageValues[index]) |
| 66 TypeError: Type error |
| 67 EXPECTED (region.width == '100') OK |
| 68 |
| 69 Invalid percentage value: Infinity |
| 70 RUN(region.viewportAnchorX = invalidPercentageValues[index]) |
| 71 TypeError: Type error |
| 72 EXPECTED (region.viewportAnchorX == '0') OK |
| 73 RUN(region.viewportAnchorY = invalidPercentageValues[index]) |
| 74 TypeError: Type error |
| 75 EXPECTED (region.viewportAnchorY == '100') OK |
| 76 RUN(region.regionAnchorX = invalidPercentageValues[index]) |
| 77 TypeError: Type error |
| 78 EXPECTED (region.regionAnchorX == '0') OK |
| 79 RUN(region.regionAnchorY = invalidPercentageValues[index]) |
| 80 TypeError: Type error |
| 81 EXPECTED (region.regionAnchorY == '100') OK |
| 82 RUN(region.width = invalidPercentageValues[index]) |
| 83 TypeError: Type error |
| 84 EXPECTED (region.width == '100') OK |
| 85 |
| 86 Invalid percentage value: NaN |
| 87 RUN(region.viewportAnchorX = invalidPercentageValues[index]) |
| 88 TypeError: Type error |
| 89 EXPECTED (region.viewportAnchorX == '0') OK |
| 90 RUN(region.viewportAnchorY = invalidPercentageValues[index]) |
| 91 TypeError: Type error |
| 92 EXPECTED (region.viewportAnchorY == '100') OK |
| 93 RUN(region.regionAnchorX = invalidPercentageValues[index]) |
| 94 TypeError: Type error |
| 95 EXPECTED (region.regionAnchorX == '0') OK |
| 96 RUN(region.regionAnchorY = invalidPercentageValues[index]) |
| 97 TypeError: Type error |
| 98 EXPECTED (region.regionAnchorY == '100') OK |
| 99 RUN(region.width = invalidPercentageValues[index]) |
| 100 TypeError: Type error |
| 101 EXPECTED (region.width == '100') OK |
| 102 RUN(region.height = -1) |
| 103 IndexSizeError: Index or size was negative, or greater than the allowed value. |
| 104 EXPECTED (region.height == '3') OK |
| 105 |
| 106 ** Test that proper mutation keeps assigned value. ** |
| 107 RUN(region.height = 130) |
| 108 EXPECTED (region.height == '130') OK |
| 109 RUN(region.viewportAnchorX = 64) |
| 110 EXPECTED (region.viewportAnchorX == '64') OK |
| 111 RUN(region.viewportAnchorY = 32) |
| 112 EXPECTED (region.viewportAnchorY == '32') OK |
| 113 RUN(region.regionAnchorX = 16) |
| 114 EXPECTED (region.regionAnchorX == '16') OK |
| 115 RUN(region.regionAnchorY = 8) |
| 116 EXPECTED (region.regionAnchorY == '8') OK |
| 117 RUN(region.width = 42) |
| 118 EXPECTED (region.width == '42') OK |
4 END OF TEST | 119 END OF TEST |
5 | 120 |
OLD | NEW |