<!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>[182223] 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/182223">182223</a></dd>
<dt>Author</dt> <dd>ap@apple.com</dd>
<dt>Date</dt> <dd>2015-04-01 00:07:12 -0700 (Wed, 01 Apr 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>REGRESSION (<a href="http://trac.webkit.org/projects/webkit/changeset/179820">r179820</a>): accessibility/textarea-selected-text-range.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=142976

Reviewed by Chris Fleizach.

* platform/mac/TestExpectations: Removed an expectation.

* accessibility/textarea-selected-text-range-expected.txt:
* accessibility/textarea-selected-text-range.html:
Don't race a timer with an internal dispatch_async.

* platform/mac/accessibility/select-element-selection-with-optgroups-expected.txt:
* platform/mac/accessibility/select-element-selection-with-optgroups.html:
This test had the same issue.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsaccessibilitytextareaselectedtextrangeexpectedtxt">trunk/LayoutTests/accessibility/textarea-selected-text-range-expected.txt</a></li>
<li><a href="#trunkLayoutTestsaccessibilitytextareaselectedtextrangehtml">trunk/LayoutTests/accessibility/textarea-selected-text-range.html</a></li>
<li><a href="#trunkLayoutTestsplatformmacTestExpectations">trunk/LayoutTests/platform/mac/TestExpectations</a></li>
<li><a href="#trunkLayoutTestsplatformmacaccessibilityselectelementselectionwithoptgroupsexpectedtxt">trunk/LayoutTests/platform/mac/accessibility/select-element-selection-with-optgroups-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacaccessibilityselectelementselectionwithoptgroupshtml">trunk/LayoutTests/platform/mac/accessibility/select-element-selection-with-optgroups.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (182222 => 182223)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2015-04-01 06:18:30 UTC (rev 182222)
+++ trunk/LayoutTests/ChangeLog        2015-04-01 07:07:12 UTC (rev 182223)
</span><span class="lines">@@ -1,3 +1,20 @@
</span><ins>+2015-04-01  Alexey Proskuryakov  &lt;ap@apple.com&gt;
+
+        REGRESSION (r179820): accessibility/textarea-selected-text-range.html is flaky
+        https://bugs.webkit.org/show_bug.cgi?id=142976
+
+        Reviewed by Chris Fleizach.
+
+        * platform/mac/TestExpectations: Removed an expectation.

+        * accessibility/textarea-selected-text-range-expected.txt:
+        * accessibility/textarea-selected-text-range.html:
+        Don't race a timer with an internal dispatch_async.
+
+        * platform/mac/accessibility/select-element-selection-with-optgroups-expected.txt:
+        * platform/mac/accessibility/select-element-selection-with-optgroups.html:
+        This test had the same issue.
+
</ins><span class="cx"> 2015-03-31  Ryosuke Niwa  &lt;rniwa@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         ES6 class syntax should allow static setters and getters
</span></span></pre></div>
<a id="trunkLayoutTestsaccessibilitytextareaselectedtextrangeexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/accessibility/textarea-selected-text-range-expected.txt (182222 => 182223)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/accessibility/textarea-selected-text-range-expected.txt        2015-04-01 06:18:30 UTC (rev 182222)
+++ trunk/LayoutTests/accessibility/textarea-selected-text-range-expected.txt        2015-04-01 07:07:12 UTC (rev 182223)
</span><span class="lines">@@ -1,6 +1,6 @@
</span><del>-PASS textArea.selectedTextRange is '{4, 0}'
-PASS textArea.selectedTextRange is '{8, 2}'
-PASS textArea.selectedTextRange is '{25, 0}'
</del><ins>+PASS textArea.selectedTextRange became '{4, 0}'
+PASS textArea.selectedTextRange became '{8, 2}'
+PASS textArea.selectedTextRange became '{25, 0}'
</ins><span class="cx"> PASS successfullyParsed is true
</span><span class="cx"> 
</span><span class="cx"> TEST COMPLETE
</span></span></pre></div>
<a id="trunkLayoutTestsaccessibilitytextareaselectedtextrangehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/accessibility/textarea-selected-text-range.html (182222 => 182223)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/accessibility/textarea-selected-text-range.html        2015-04-01 06:18:30 UTC (rev 182222)
+++ trunk/LayoutTests/accessibility/textarea-selected-text-range.html        2015-04-01 07:07:12 UTC (rev 182223)
</span><span class="lines">@@ -22,19 +22,13 @@
</span><span class="cx"> 
</span><span class="cx">             // After setting a property through accessibility, the value won't be updated immediately, so we
</span><span class="cx">             // must check after a timeout to re-verify the value.
</span><del>-            setTimeout(function() {
-                shouldBe(&quot;textArea.selectedTextRange&quot;, &quot;'{4, 0}'&quot;);
</del><ins>+            shouldBecomeEqual(&quot;textArea.selectedTextRange&quot;, &quot;'{4, 0}'&quot;, function() {
</ins><span class="cx">                 textArea.setSelectedTextRange(8,2);
</span><del>-                setTimeout(function() {
-                    shouldBe(&quot;textArea.selectedTextRange&quot;, &quot;'{8, 2}'&quot;);
</del><ins>+                shouldBecomeEqual(&quot;textArea.selectedTextRange&quot;, &quot;'{8, 2}'&quot;, function() {
</ins><span class="cx">                     textArea.setSelectedTextRange(100,0);
</span><del>-                    setTimeout(function() {
-                        shouldBe(&quot;textArea.selectedTextRange&quot;, &quot;'{25, 0}'&quot;);
-                        finishJSTest();
-                    }, 1);
-                }, 1);
-            }, 1);
-
</del><ins>+                    shouldBecomeEqual(&quot;textArea.selectedTextRange&quot;, &quot;'{25, 0}'&quot;, finishJSTest);
+                });
+            });
</ins><span class="cx">         }
</span><span class="cx">     &lt;/script&gt;
</span><span class="cx"> &lt;script src=&quot;../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac/TestExpectations (182222 => 182223)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/TestExpectations        2015-04-01 06:18:30 UTC (rev 182222)
+++ trunk/LayoutTests/platform/mac/TestExpectations        2015-04-01 07:07:12 UTC (rev 182223)
</span><span class="lines">@@ -45,8 +45,6 @@
</span><span class="cx"> # ariaControlsElementAtIndex is not implemented in mac
</span><span class="cx"> webkit.org/b/127908 accessibility/aria-controls.html [ Skip ]
</span><span class="cx"> 
</span><del>-webkit.org/b/142976 accessibility/textarea-selected-text-range.html [ Pass Failure ]
-
</del><span class="cx"> # Need to add functionality to DumpRenderTree to handle error pages
</span><span class="cx"> fast/history/back-forward-reset-after-error-handling.html
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacaccessibilityselectelementselectionwithoptgroupsexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac/accessibility/select-element-selection-with-optgroups-expected.txt (182222 => 182223)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/accessibility/select-element-selection-with-optgroups-expected.txt        2015-04-01 06:18:30 UTC (rev 182222)
+++ trunk/LayoutTests/platform/mac/accessibility/select-element-selection-with-optgroups-expected.txt        2015-04-01 07:07:12 UTC (rev 182223)
</span><span class="lines">@@ -5,11 +5,11 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> PASS selectElement.selectedChildrenCount is 0
</span><del>-PASS selectElement.selectedChildrenCount is 1
</del><ins>+PASS selectElement.selectedChildrenCount became 1
</ins><span class="cx"> PASS selectElement.selectedChildAtIndex(0).isEqual(option1) is true
</span><del>-PASS selectElement.selectedChildrenCount is 1
</del><ins>+PASS selectElement.selectedChildrenCount became 1
</ins><span class="cx"> PASS selectElement.selectedChildAtIndex(0).isEqual(option2) is true
</span><del>-PASS selectElement.selectedChildrenCount is 1
</del><ins>+PASS selectElement.selectedChildrenCount became 1
</ins><span class="cx"> PASS selectElement.selectedChildAtIndex(0).isEqual(option3) is true
</span><span class="cx"> PASS successfullyParsed is true
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacaccessibilityselectelementselectionwithoptgroupshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac/accessibility/select-element-selection-with-optgroups.html (182222 => 182223)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/accessibility/select-element-selection-with-optgroups.html        2015-04-01 06:18:30 UTC (rev 182222)
+++ trunk/LayoutTests/platform/mac/accessibility/select-element-selection-with-optgroups.html        2015-04-01 07:07:12 UTC (rev 182223)
</span><span class="lines">@@ -1,4 +1,4 @@
</span><del>-&lt;!DOCTYPE HTML PUBLIC &quot;-//IETF//DTD HTML//EN&quot;&gt;
</del><ins>+&lt;!DOCTYPE html&gt;
</ins><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><span class="cx"> &lt;script src=&quot;../../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</span><span class="lines">@@ -22,43 +22,36 @@
</span><span class="cx"> &lt;div id=&quot;console&quot;&gt;&lt;/div&gt;
</span><span class="cx"> 
</span><span class="cx"> &lt;script&gt;
</span><ins>+description(&quot;This tests that setting selection within a list box works correctly if there are optgroups&quot;);
+window.jsTestIsAsync = true;
</ins><span class="cx"> 
</span><del>-    description(&quot;This tests that setting selection within a list box works correctly if there are optgroups&quot;);
</del><ins>+if (window.accessibilityController) {
+    document.getElementById(&quot;suite&quot;).focus();
+    var selectElement = accessibilityController.focusedElement;
</ins><span class="cx"> 
</span><del>-    if (window.accessibilityController) {
-          window.jsTestIsAsync = true;
</del><ins>+    shouldBe(&quot;selectElement.selectedChildrenCount&quot;, &quot;0&quot;);
</ins><span class="cx"> 
</span><del>-          document.getElementById(&quot;suite&quot;).focus();
-          var selectElement = accessibilityController.focusedElement;
-    
-          shouldBe(&quot;selectElement.selectedChildrenCount&quot;, &quot;0&quot;);
-          
-          var option1 = selectElement.childAtIndex(1);
-          var option2 = selectElement.childAtIndex(2);
-          var option3 = selectElement.childAtIndex(4);
</del><ins>+    var option1 = selectElement.childAtIndex(1);
+    var option2 = selectElement.childAtIndex(2);
+    var option3 = selectElement.childAtIndex(4);
</ins><span class="cx"> 
</span><del>-          // Selection operations happen after a delay so they don't hang. Check the result on a timeout.
-          selectElement.setSelectedChild(option1);
-          setTimeout(function() {
-              shouldBe(&quot;selectElement.selectedChildrenCount&quot;, &quot;1&quot;);
-              shouldBeTrue(&quot;selectElement.selectedChildAtIndex(0).isEqual(option1)&quot;);
</del><ins>+    // Selection operations happen after a delay so they don't hang. Check the result on a timeout.
+    selectElement.setSelectedChild(option1);
+    shouldBecomeEqual(&quot;selectElement.selectedChildrenCount&quot;, &quot;1&quot;, function() {
+        shouldBeTrue(&quot;selectElement.selectedChildAtIndex(0).isEqual(option1)&quot;);
</ins><span class="cx"> 
</span><del>-              selectElement.setSelectedChild(option2);
-              setTimeout(function() {
-                  shouldBe(&quot;selectElement.selectedChildrenCount&quot;, &quot;1&quot;);
-                  shouldBeTrue(&quot;selectElement.selectedChildAtIndex(0).isEqual(option2)&quot;);
</del><ins>+        selectElement.setSelectedChild(option2);
+        shouldBecomeEqual(&quot;selectElement.selectedChildrenCount&quot;, &quot;1&quot;, function() {
+           shouldBeTrue(&quot;selectElement.selectedChildAtIndex(0).isEqual(option2)&quot;);
</ins><span class="cx"> 
</span><del>-                  selectElement.setSelectedChild(option3);
-                  setTimeout(function() {
-                      shouldBe(&quot;selectElement.selectedChildrenCount&quot;, &quot;1&quot;);
-                      shouldBeTrue(&quot;selectElement.selectedChildAtIndex(0).isEqual(option3)&quot;);
-                      finishJSTest();
-                  }, 1);
-              }, 1);
-           }, 1);
-        
-    }
-
</del><ins>+            selectElement.setSelectedChild(option3);
+            shouldBecomeEqual(&quot;selectElement.selectedChildrenCount&quot;, &quot;1&quot;, function() {
+                shouldBeTrue(&quot;selectElement.selectedChildAtIndex(0).isEqual(option3)&quot;);
+                finishJSTest();
+            });
+        });
+    });
+}
</ins><span class="cx"> &lt;/script&gt;
</span><span class="cx"> 
</span><span class="cx"> &lt;script src=&quot;../../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
</span></span></pre>
</div>
</div>

</body>
</html>