Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(501)

Side by Side Diff: third_party/WebKit/LayoutTests/media/track/cue-style-invalidation.html

Issue 1079323002: Support text track selection in video controls (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and lgtm nits Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 19 matching lines...) Expand all
30 30
31 var cueNode = textTrackDisplayElement(video, "cue"); 31 var cueNode = textTrackDisplayElement(video, "cue");
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(), 8); 40 assert_equals(internals.updateStyleAndReturnAffectedElementCount(), 9);
41 assert_equals(getComputedStyle(cueNode).backgroundColor, green); 41 assert_equals(getComputedStyle(cueNode).backgroundColor, green);
42 42
43 assert_equals(getComputedStyle(cNode).backgroundColor, red); 43 assert_equals(getComputedStyle(cNode).backgroundColor, red);
44 ascendant.offsetTop; 44 ascendant.offsetTop;
45 ascendant.classList.add("cuefunc"); 45 ascendant.classList.add("cuefunc");
46 if (window.internals) 46 if (window.internals)
47 assert_equals(internals.updateStyleAndReturnAffectedElementCount(), 1); 47 assert_equals(internals.updateStyleAndReturnAffectedElementCount(), 1);
48 assert_equals(getComputedStyle(cNode).backgroundColor, green); 48 assert_equals(getComputedStyle(cNode).backgroundColor, green);
49 49
50 assert_equals(getComputedStyle(iNode).backgroundColor, red); 50 assert_equals(getComputedStyle(iNode).backgroundColor, red);
51 ascendant.offsetTop; 51 ascendant.offsetTop;
52 ascendant.classList.add("past"); 52 ascendant.classList.add("past");
53 if (window.internals) 53 if (window.internals)
54 assert_equals(internals.updateStyleAndReturnAffectedElementCount(), 1); 54 assert_equals(internals.updateStyleAndReturnAffectedElementCount(), 1);
55 assert_equals(getComputedStyle(iNode).backgroundColor, green); 55 assert_equals(getComputedStyle(iNode).backgroundColor, green);
56 56
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>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698