<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[174472] trunk/LayoutTests</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/174472">174472</a></dd>
<dt>Author</dt> <dd>jer.noble@apple.com</dd>
<dt>Date</dt> <dd>2014-10-08 13:04:33 -0700 (Wed, 08 Oct 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Layout Test media/track/track-forced-subtitles-in-band.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=137505

Reviewed by Simon Fraser.

Now that the media controls can have audio as well as text tracks, use the aria-labelledby attribute
to get the &lt;ul&gt; containing the text track menu list items.

* media/track/track-forced-subtitles-in-band.html:
* media/track/track-user-preferences-expected.txt:
* media/track/track-user-preferences.html:
* media/trackmenu-test.js:
(trackMenuListByLabel):
(captionTrackMenuList):
(audioTrackMenuList):
(indexOfMenuItemBeginningWith):
(indexOfCaptionMenuItemBeginningWith):
(indexOfAudioTrackMenuItemBeginningWith):
(selectMenuItemFromList):
(selectCaptionMenuItem):
(selectAudioTrackMenuItem):
(listTrackMenu):
(trackMenuList): Deleted.
* media/video-controls-audiotracks-trackmenu.html:
* media/video-controls-captions-trackmenu-includes-enabled-track.html:
* media/video-controls-captions-trackmenu-only-captions-descriptions-and-subtitles.html:
* media/video-controls-captions-trackmenu.html:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsTestExpectations">trunk/LayoutTests/TestExpectations</a></li>
<li><a href="#trunkLayoutTestsmediatracktrackforcedsubtitlesinbandhtml">trunk/LayoutTests/media/track/track-forced-subtitles-in-band.html</a></li>
<li><a href="#trunkLayoutTestsmediatracktrackuserpreferencesexpectedtxt">trunk/LayoutTests/media/track/track-user-preferences-expected.txt</a></li>
<li><a href="#trunkLayoutTestsmediatracktrackuserpreferenceshtml">trunk/LayoutTests/media/track/track-user-preferences.html</a></li>
<li><a href="#trunkLayoutTestsmediatrackmenutestjs">trunk/LayoutTests/media/trackmenu-test.js</a></li>
<li><a href="#trunkLayoutTestsmediavideocontrolsaudiotrackstrackmenuhtml">trunk/LayoutTests/media/video-controls-audiotracks-trackmenu.html</a></li>
<li><a href="#trunkLayoutTestsmediavideocontrolscaptionstrackmenuincludesenabledtrackhtml">trunk/LayoutTests/media/video-controls-captions-trackmenu-includes-enabled-track.html</a></li>
<li><a href="#trunkLayoutTestsmediavideocontrolscaptionstrackmenuonlycaptionsdescriptionsandsubtitleshtml">trunk/LayoutTests/media/video-controls-captions-trackmenu-only-captions-descriptions-and-subtitles.html</a></li>
<li><a href="#trunkLayoutTestsmediavideocontrolscaptionstrackmenuhtml">trunk/LayoutTests/media/video-controls-captions-trackmenu.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (174471 => 174472)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2014-10-08 20:01:28 UTC (rev 174471)
+++ trunk/LayoutTests/ChangeLog        2014-10-08 20:04:33 UTC (rev 174472)
</span><span class="lines">@@ -1,3 +1,33 @@
</span><ins>+2014-10-08  Jer Noble  &lt;jer.noble@apple.com&gt;
+
+        Layout Test media/track/track-forced-subtitles-in-band.html is flaky
+        https://bugs.webkit.org/show_bug.cgi?id=137505
+
+        Reviewed by Simon Fraser.
+
+        Now that the media controls can have audio as well as text tracks, use the aria-labelledby attribute
+        to get the &lt;ul&gt; containing the text track menu list items.
+
+        * media/track/track-forced-subtitles-in-band.html:
+        * media/track/track-user-preferences-expected.txt:
+        * media/track/track-user-preferences.html:
+        * media/trackmenu-test.js:
+        (trackMenuListByLabel):
+        (captionTrackMenuList):
+        (audioTrackMenuList):
+        (indexOfMenuItemBeginningWith):
+        (indexOfCaptionMenuItemBeginningWith):
+        (indexOfAudioTrackMenuItemBeginningWith):
+        (selectMenuItemFromList):
+        (selectCaptionMenuItem):
+        (selectAudioTrackMenuItem):
+        (listTrackMenu):
+        (trackMenuList): Deleted.
+        * media/video-controls-audiotracks-trackmenu.html:
+        * media/video-controls-captions-trackmenu-includes-enabled-track.html:
+        * media/video-controls-captions-trackmenu-only-captions-descriptions-and-subtitles.html:
+        * media/video-controls-captions-trackmenu.html:
+
</ins><span class="cx"> 2014-10-08  Dean Jackson  &lt;dino@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Add deprecation warning for CSSKeyframesRule::appendRule
</span></span></pre></div>
<a id="trunkLayoutTestsTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/TestExpectations (174471 => 174472)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/TestExpectations        2014-10-08 20:01:28 UTC (rev 174471)
+++ trunk/LayoutTests/TestExpectations        2014-10-08 20:04:33 UTC (rev 174472)
</span><span class="lines">@@ -217,5 +217,3 @@
</span><span class="cx"> 
</span><span class="cx"> # Promises/A+ 2.3.3 has many tests and it sometimes exceeds the time limit.
</span><span class="cx"> webkit.org/b/136878 js/promises-tests/promises-tests-2-3-3.html [ Slow ]
</span><del>-
-webkit.org/b/137525 media/track/track-forced-subtitles-in-band.html [ Failure ]
</del></span></pre></div>
<a id="trunkLayoutTestsmediatracktrackforcedsubtitlesinbandhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/track/track-forced-subtitles-in-band.html (174471 => 174472)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/track/track-forced-subtitles-in-band.html        2014-10-08 20:01:28 UTC (rev 174471)
+++ trunk/LayoutTests/media/track/track-forced-subtitles-in-band.html        2014-10-08 20:04:33 UTC (rev 174472)
</span><span class="lines">@@ -28,7 +28,7 @@
</span><span class="cx">                 // Click the CC button to show the menu because it isn't created until it becomes visible.
</span><span class="cx">                 clickCCButton();
</span><span class="cx"> 
</span><del>-                trackMenuItems = trackMenuList();
</del><ins>+                trackMenuItems = captionTrackMenuList();
</ins><span class="cx">                 if (!trackMenuItems) {
</span><span class="cx">                     failTest(&quot;Failed to find track menu!&quot;);
</span><span class="cx">                     return;
</span></span></pre></div>
<a id="trunkLayoutTestsmediatracktrackuserpreferencesexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/track/track-user-preferences-expected.txt (174471 => 174472)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/track/track-user-preferences-expected.txt        2014-10-08 20:01:28 UTC (rev 174471)
+++ trunk/LayoutTests/media/track/track-user-preferences-expected.txt        2014-10-08 20:04:33 UTC (rev 174472)
</span><span class="lines">@@ -18,9 +18,9 @@
</span><span class="cx"> 
</span><span class="cx"> Test 3: select 'fr' track from menu
</span><span class="cx"> - show captions menu.
</span><del>-EXPECTED (trackMenuItems[indexOfMenuItemBeginningWith('French')].className == '') OK
-EXPECTED (trackMenuItems[indexOfMenuItemBeginningWith('English')].className == '') OK
-EXPECTED (trackMenuItems[indexOfMenuItemBeginningWith('Norwegian')].className == 'selected') OK
</del><ins>+EXPECTED (trackMenuItems[indexOfCaptionMenuItemBeginningWith('French')].className == '') OK
+EXPECTED (trackMenuItems[indexOfCaptionMenuItemBeginningWith('English')].className == '') OK
+EXPECTED (trackMenuItems[indexOfCaptionMenuItemBeginningWith('Norwegian')].className == 'selected') OK
</ins><span class="cx"> - click on 'French' menu item.
</span><span class="cx"> EVENT(load)
</span><span class="cx"> EXPECTED (event.target.srclang == 'fr') OK
</span></span></pre></div>
<a id="trunkLayoutTestsmediatracktrackuserpreferenceshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/track/track-user-preferences.html (174471 => 174472)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/track/track-user-preferences.html        2014-10-08 20:01:28 UTC (rev 174471)
+++ trunk/LayoutTests/media/track/track-user-preferences.html        2014-10-08 20:04:33 UTC (rev 174472)
</span><span class="lines">@@ -83,10 +83,10 @@
</span><span class="cx">                     break;
</span><span class="cx"> 
</span><span class="cx">                 case 4:
</span><del>-                    trackMenuItems = trackMenuList();
-                    testExpected(&quot;trackMenuItems[indexOfMenuItemBeginningWith('French')].className&quot;, &quot;&quot;);
-                    testExpected(&quot;trackMenuItems[indexOfMenuItemBeginningWith('English')].className&quot;, &quot;&quot;);
-                    testExpected(&quot;trackMenuItems[indexOfMenuItemBeginningWith('Norwegian')].className&quot;, &quot;selected&quot;);
</del><ins>+                    trackMenuItems = captionTrackMenuList();
+                    testExpected(&quot;trackMenuItems[indexOfCaptionMenuItemBeginningWith('French')].className&quot;, &quot;&quot;);
+                    testExpected(&quot;trackMenuItems[indexOfCaptionMenuItemBeginningWith('English')].className&quot;, &quot;&quot;);
+                    testExpected(&quot;trackMenuItems[indexOfCaptionMenuItemBeginningWith('Norwegian')].className&quot;, &quot;selected&quot;);
</ins><span class="cx"> 
</span><span class="cx">                     selectCaptionMenuItem(&quot;French&quot;);
</span><span class="cx">                     expectedLanguage = 'fr';
</span></span></pre></div>
<a id="trunkLayoutTestsmediatrackmenutestjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/trackmenu-test.js (174471 => 174472)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/trackmenu-test.js        2014-10-08 20:01:28 UTC (rev 174471)
+++ trunk/LayoutTests/media/trackmenu-test.js        2014-10-08 20:04:33 UTC (rev 174472)
</span><span class="lines">@@ -42,7 +42,7 @@
</span><span class="cx">   return trackListElement;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-function trackMenuList()
</del><ins>+function trackMenuListByLabel(label)
</ins><span class="cx"> {
</span><span class="cx">     trackListElement = getTrackListElement();
</span><span class="cx">     if (!trackListElement){
</span><span class="lines">@@ -50,8 +50,13 @@
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    var trackLists = trackListElement.querySelectorAll(&quot;ul&quot;);
+    var trackList = Array.prototype.find.call(trackLists, function(item) {
+        return item.getAttribute('aria-labelledby') === label;
+    });
+
+
</ins><span class="cx">     // Track list should have a &lt;ul&gt; with &lt;li&gt; children.
</span><del>-    var trackList = trackListElement.querySelector(&quot;ul&quot;);
</del><span class="cx">     if (!trackList) {
</span><span class="cx">         failTest(&quot;Could not find a child ul element in track list menu&quot;);
</span><span class="cx">         return;
</span><span class="lines">@@ -65,9 +70,18 @@
</span><span class="cx">     return trackListItems;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-function indexOfMenuItemBeginningWith(title)
</del><ins>+function captionTrackMenuList()
</ins><span class="cx"> {
</span><del>-    var trackMenuItems = trackMenuList();
</del><ins>+    return trackMenuListByLabel('webkitMediaControlsClosedCaptionsHeading');
+}
+
+function audioTrackMenuList()
+{
+    return trackMenuListByLabel('webkitMediaControlsAudioTrackHeading');
+}
+
+function indexOfMenuItemBeginningWith(title, trackMenuItems)
+{
</ins><span class="cx">     for (i = 0; i &lt; trackMenuItems.length; ++i) {
</span><span class="cx">         if (trackMenuItems[i].textContent.indexOf(title) == 0)
</span><span class="cx">             break;
</span><span class="lines">@@ -75,15 +89,18 @@
</span><span class="cx">     return (i &lt; trackMenuItems.length) ? i : -1;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-function selectCaptionMenuItem(title)
</del><ins>+function indexOfCaptionMenuItemBeginningWith(title)
</ins><span class="cx"> {
</span><del>-    var trackMenuItems = trackMenuList();
-    var index = indexOfMenuItemBeginningWith(title);
-    if (index &lt; 0) {
-        failTest(&quot;Menu item &quot; + title + &quot; not found in track list menu.&quot;);
-        return;
-    }
</del><ins>+    return indexOfMenuItemBeginningWith(title, captionTrackMenuList());
+}
</ins><span class="cx"> 
</span><ins>+function indexOfAudioTrackMenuItemBeginningWith(title)
+{
+    return indexOfMenuItemBeginningWith(title, audioTrackMenuList());
+}
+
+function selectMenuItemFromList(title, trackMenuItems, index)
+{
</ins><span class="cx">     consoleWrite(&quot;- click on '&quot; + title + &quot;' menu item.&quot;);
</span><span class="cx">     var selectedTrackItem = trackMenuItems[index];
</span><span class="cx">     var boundingRect = selectedTrackItem.getBoundingClientRect();
</span><span class="lines">@@ -94,6 +111,28 @@
</span><span class="cx">     eventSender.mouseUp();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+function selectCaptionMenuItem(title)
+{
+    var index = indexOfCaptionMenuItemBeginningWith(title);
+    if (index &lt; 0) {
+        failTest(&quot;Menu item &quot; + title + &quot; not found in track list menu.&quot;);
+        return;
+    }
+
+    selectMenuItemFromList(title, captionTrackMenuList(), index);
+}
+
+function selectAudioTrackMenuItem(title)
+{
+    var index = indexOfAudioTrackMenuItemBeginningWith(title);
+    if (index &lt; 0) {
+        failTest(&quot;Menu item &quot; + title + &quot; not found in track list menu.&quot;);
+        return;
+    }
+
+    selectMenuItemFromList(title, audioTrackMenuList(), index);
+}
+
</ins><span class="cx"> function showTrackMenu()
</span><span class="cx"> {
</span><span class="cx">     clickCCButton();
</span><span class="lines">@@ -111,7 +150,7 @@
</span><span class="cx"> 
</span><span class="cx"> function listTrackMenu()
</span><span class="cx"> {
</span><del>-    var trackListItems = trackMenuList();
</del><ins>+    var trackListItems = captionTrackMenuList();
</ins><span class="cx">     consoleWrite(&quot;Track menu:&quot;);
</span><span class="cx">     for (i = 0; i &lt; trackListItems.length; i++) {
</span><span class="cx">         var logString = i + &quot;: \&quot;&quot; + trackListItems[i].textContent + &quot;\&quot;&quot;;
</span></span></pre></div>
<a id="trunkLayoutTestsmediavideocontrolsaudiotrackstrackmenuhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/video-controls-audiotracks-trackmenu.html (174471 => 174472)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/video-controls-audiotracks-trackmenu.html        2014-10-08 20:01:28 UTC (rev 174471)
+++ trunk/LayoutTests/media/video-controls-audiotracks-trackmenu.html        2014-10-08 20:04:33 UTC (rev 174472)
</span><span class="lines">@@ -25,7 +25,7 @@
</span><span class="cx"> 
</span><span class="cx">             function testMenu()
</span><span class="cx">             {
</span><del>-                trackListItems = trackMenuList();
</del><ins>+                trackListItems = audioTrackMenuList();
</ins><span class="cx">                 var expectedItemCount = video.audioTracks.length;
</span><span class="cx">                 consoleWrite(&quot;There should be &quot; + expectedItemCount + &quot; items in the menu.&quot;);
</span><span class="cx">                 testExpected(&quot;trackListItems.length&quot;, expectedItemCount);
</span><span class="lines">@@ -33,7 +33,7 @@
</span><span class="cx"> 
</span><span class="cx">             function testAudioTrackEnabled()
</span><span class="cx">             {
</span><del>-                trackListItems = trackMenuList();
</del><ins>+                trackListItems = audioTrackMenuList();
</ins><span class="cx">                 consoleWrite(&quot;*** Menu item 0 should be selected&quot;);
</span><span class="cx"> 
</span><span class="cx">                 testExpected(&quot;trackListItems.length&quot;, 3);
</span><span class="lines">@@ -47,7 +47,7 @@
</span><span class="cx">             function selectDifferentAudioTrack()
</span><span class="cx">             {
</span><span class="cx">                 consoleWrite(&quot;*** Selecting French Track&quot;);
</span><del>-                selectCaptionMenuItem(&quot;French&quot;);
</del><ins>+                selectAudioTrackMenuItem(&quot;French&quot;);
</ins><span class="cx">                 setTimeout(testAudioTrackDisabled, 100);
</span><span class="cx">             }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsmediavideocontrolscaptionstrackmenuincludesenabledtrackhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/video-controls-captions-trackmenu-includes-enabled-track.html (174471 => 174472)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/video-controls-captions-trackmenu-includes-enabled-track.html        2014-10-08 20:01:28 UTC (rev 174471)
+++ trunk/LayoutTests/media/video-controls-captions-trackmenu-includes-enabled-track.html        2014-10-08 20:04:33 UTC (rev 174472)
</span><span class="lines">@@ -15,7 +15,7 @@
</span><span class="cx"> 
</span><span class="cx">             function testInitialState()
</span><span class="cx">             {
</span><del>-                trackListItems = trackMenuList();
</del><ins>+                trackListItems = captionTrackMenuList();
</ins><span class="cx">                 consoleWrite(&quot;&lt;br&gt;*** Initially both tracks are disabled so neither should be selected.&quot;);
</span><span class="cx">                 testExpected(&quot;video.textTracks[0].mode&quot;, &quot;disabled&quot;);
</span><span class="cx">                 testExpected(&quot;video.textTracks[1].mode&quot;, &quot;disabled&quot;);
</span><span class="lines">@@ -35,7 +35,7 @@
</span><span class="cx">             function testMenuAfterEnablingTracks()
</span><span class="cx">             {
</span><span class="cx">                 consoleWrite(&quot;&lt;br&gt;*** Both tracks are enabled so both should be selected.&quot;);
</span><del>-                trackListItems = trackMenuList();
</del><ins>+                trackListItems = captionTrackMenuList();
</ins><span class="cx">                 testExpected(&quot;video.textTracks[0].mode&quot;, &quot;showing&quot;);
</span><span class="cx">                 testExpected(&quot;video.textTracks[1].mode&quot;, &quot;showing&quot;);
</span><span class="cx">                 consoleWrite(&quot;&quot;);
</span></span></pre></div>
<a id="trunkLayoutTestsmediavideocontrolscaptionstrackmenuonlycaptionsdescriptionsandsubtitleshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/video-controls-captions-trackmenu-only-captions-descriptions-and-subtitles.html (174471 => 174472)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/video-controls-captions-trackmenu-only-captions-descriptions-and-subtitles.html        2014-10-08 20:01:28 UTC (rev 174471)
+++ trunk/LayoutTests/media/video-controls-captions-trackmenu-only-captions-descriptions-and-subtitles.html        2014-10-08 20:04:33 UTC (rev 174472)
</span><span class="lines">@@ -13,7 +13,7 @@
</span><span class="cx">             function testMenu()
</span><span class="cx">             {
</span><span class="cx">                 showTrackMenu();
</span><del>-                trackListItems = trackMenuList();
</del><ins>+                trackListItems = captionTrackMenuList();
</ins><span class="cx">                 var matchingTracks = 0;
</span><span class="cx">                 for (var i = 0; i &lt; video.textTracks.length; ++i) {
</span><span class="cx">                     var kind = video.textTracks[i].kind;
</span></span></pre></div>
<a id="trunkLayoutTestsmediavideocontrolscaptionstrackmenuhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/media/video-controls-captions-trackmenu.html (174471 => 174472)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/media/video-controls-captions-trackmenu.html        2014-10-08 20:01:28 UTC (rev 174471)
+++ trunk/LayoutTests/media/video-controls-captions-trackmenu.html        2014-10-08 20:04:33 UTC (rev 174472)
</span><span class="lines">@@ -24,7 +24,7 @@
</span><span class="cx">                 consoleWrite(&quot;&quot;);
</span><span class="cx">             }
</span><span class="cx"> 
</span><del>-            function trackMenuList()
</del><ins>+            function captionTrackMenuList()
</ins><span class="cx">             {
</span><span class="cx">                 var trackListElement = getTrackListElement();
</span><span class="cx">                 if (!trackListElement)
</span><span class="lines">@@ -46,7 +46,7 @@
</span><span class="cx"> 
</span><span class="cx">             function testMenu()
</span><span class="cx">             {
</span><del>-                trackListItems = trackMenuList();
</del><ins>+                trackListItems = captionTrackMenuList();
</ins><span class="cx">                 var expectedItemCount = video.textTracks.length + 2;
</span><span class="cx">                 consoleWrite(&quot;There should be &quot; + expectedItemCount + &quot; items in the menu.&quot;);
</span><span class="cx">                 testExpected(&quot;trackListItems.length&quot;, expectedItemCount);
</span><span class="lines">@@ -55,7 +55,7 @@
</span><span class="cx">             function selectCaptionMenuItem(index, nextStep)
</span><span class="cx">             {
</span><span class="cx">                 // Click on the selected item
</span><del>-                var trackListItems = trackMenuList();
</del><ins>+                var trackListItems = captionTrackMenuList();
</ins><span class="cx">                 var selectedTrackItem = trackListItems[index];
</span><span class="cx">                 var boundingRect = selectedTrackItem.getBoundingClientRect();
</span><span class="cx">                 var x = boundingRect.left + boundingRect.width / 2;
</span></span></pre>
</div>
</div>

</body>
</html>