| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <title>Check that descendant style invalidation works with ::cue selectors.</tit
le> | 2 <title>Check that descendant style invalidation works with ::cue selectors.</tit
le> |
| 3 <script src="../media-file.js"></script> | 3 <script src="../media-file.js"></script> |
| 4 <script src="../media-controls.js"></script> | 4 <script src="../media-controls.js"></script> |
| 5 <script src="../../resources/testharness.js"></script> | 5 <script src="../../resources/testharness.js"></script> |
| 6 <script src="../../resources/testharnessreport.js"></script> | 6 <script src="../../resources/testharnessreport.js"></script> |
| 7 <style> | 7 <style> |
| 8 video::cue, | 8 video::cue, |
| 9 video::cue(c), | 9 video::cue(c), |
| 10 video::cue(i:past), | 10 video::cue(i:past), |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 </video> | 21 </video> |
| 22 </div> | 22 </div> |
| 23 <script> | 23 <script> |
| 24 async_test(function(t) { | 24 async_test(function(t) { |
| 25 var video = document.querySelector('video'); | 25 var video = document.querySelector('video'); |
| 26 video.src = findMediaFile("video", "../content/test"); | 26 video.src = findMediaFile("video", "../content/test"); |
| 27 video.onseeked = t.step_func_done(function() { | 27 video.onseeked = t.step_func_done(function() { |
| 28 var red = "rgb(255, 0, 0)"; | 28 var red = "rgb(255, 0, 0)"; |
| 29 var green = "rgb(0, 128, 0)"; | 29 var green = "rgb(0, 128, 0)"; |
| 30 | 30 |
| 31 var cueNode = textTrackDisplayElement(video, "cue"); | 31 var cueNode = textTrackCueElementByIndex(video, 0).firstChild; |
| 32 var iNode = cueNode.firstElementChild; | 32 var iNode = cueNode.firstElementChild; |
| 33 var cNode = iNode.nextSibling.nextSibling; | 33 var cNode = iNode.nextSibling.nextSibling; |
| 34 var bNode = cNode.nextSibling.nextSibling; | 34 var bNode = cNode.nextSibling.nextSibling; |
| 35 | 35 |
| 36 assert_equals(getComputedStyle(cueNode).backgroundColor, red); | 36 assert_equals(getComputedStyle(cueNode).backgroundColor, red); |
| 37 ascendant.offsetTop; | 37 ascendant.offsetTop; |
| 38 ascendant.classList.add("cue"); | 38 ascendant.classList.add("cue"); |
| 39 if (window.internals) | 39 if (window.internals) |
| 40 assert_equals(internals.updateStyleAndReturnAffectedElementCount(),
9); | 40 assert_equals(internals.updateStyleAndReturnAffectedElementCount(),
9); |
| 41 assert_equals(getComputedStyle(cueNode).backgroundColor, green); | 41 assert_equals(getComputedStyle(cueNode).backgroundColor, green); |
| (...skipping 15 matching lines...) Expand all Loading... |
| 57 assert_equals(getComputedStyle(bNode).backgroundColor, red); | 57 assert_equals(getComputedStyle(bNode).backgroundColor, red); |
| 58 ascendant.offsetTop; | 58 ascendant.offsetTop; |
| 59 ascendant.classList.add("future"); | 59 ascendant.classList.add("future"); |
| 60 if (window.internals) | 60 if (window.internals) |
| 61 assert_equals(internals.updateStyleAndReturnAffectedElementCount(),
1); | 61 assert_equals(internals.updateStyleAndReturnAffectedElementCount(),
1); |
| 62 assert_equals(getComputedStyle(bNode).backgroundColor, green); | 62 assert_equals(getComputedStyle(bNode).backgroundColor, green); |
| 63 }); | 63 }); |
| 64 video.currentTime = 0.1; | 64 video.currentTime = 0.1; |
| 65 }); | 65 }); |
| 66 </script> | 66 </script> |
| OLD | NEW |