Title: [122758] trunk/LayoutTests
Revision
122758
Author
[email protected]
Date
2012-07-16 13:48:40 -0700 (Mon, 16 Jul 2012)

Log Message

Fix Layout Test pointer-lock/locked-element-removed-from-dom.html flakiness.
https://bugs.webkit.org/show_bug.cgi?id=91373

Reviewed by Adrienne Walker.

pointer-lock-test-harness corrected to no longer silently allow too many
asynchronous doNextStep calls in a test. The locked-element-removed-from-dom test
generated too many events and incorrectly exited the test early.

* platform/chromium/TestExpectations:
    Re-enabled locked-element-removed-from-dom test.html
* pointer-lock/locked-element-removed-from-dom.html:
    Absorb extra doNextStep.
* pointer-lock/resources/pointer-lock-test-harness.js:
(doNextStep.setTimeout):
    Fail tests that call doNextStep too many times.

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (122757 => 122758)


--- trunk/LayoutTests/ChangeLog	2012-07-16 20:44:47 UTC (rev 122757)
+++ trunk/LayoutTests/ChangeLog	2012-07-16 20:48:40 UTC (rev 122758)
@@ -1,3 +1,22 @@
+2012-07-16  Vincent Scheib  <[email protected]>
+
+        Fix Layout Test pointer-lock/locked-element-removed-from-dom.html flakiness.
+        https://bugs.webkit.org/show_bug.cgi?id=91373
+
+        Reviewed by Adrienne Walker.
+
+        pointer-lock-test-harness corrected to no longer silently allow too many
+        asynchronous doNextStep calls in a test. The locked-element-removed-from-dom test
+        generated too many events and incorrectly exited the test early.
+
+        * platform/chromium/TestExpectations:
+            Re-enabled locked-element-removed-from-dom test.html
+        * pointer-lock/locked-element-removed-from-dom.html:
+            Absorb extra doNextStep.
+        * pointer-lock/resources/pointer-lock-test-harness.js:
+        (doNextStep.setTimeout):
+            Fail tests that call doNextStep too many times.
+
 2012-07-16  Florin Malita  <[email protected]>
 
         SVGAnimationElement::currentValuesForValuesAnimation crash

Modified: trunk/LayoutTests/platform/chromium/TestExpectations (122757 => 122758)


--- trunk/LayoutTests/platform/chromium/TestExpectations	2012-07-16 20:44:47 UTC (rev 122757)
+++ trunk/LayoutTests/platform/chromium/TestExpectations	2012-07-16 20:48:40 UTC (rev 122758)
@@ -3728,9 +3728,6 @@
 BUGWK90980 LINUX MAC DEBUG : fast/forms/textarea/textarea-state-restore.html = PASS TIMEOUT
 BUGWK90980 WIN : fast/forms/textarea/textarea-state-restore.html = PASS TIMEOUT
 
-// Flaky since creation in 122626
-BUGWK91373 WIN : pointer-lock/locked-element-removed-from-dom.html = PASS TEXT
-
 // Started crashing after 122286
 BUGWK91133 WIN : storage/indexeddb/constants.html = PASS CRASH
 

Modified: trunk/LayoutTests/pointer-lock/locked-element-removed-from-dom.html (122757 => 122758)


--- trunk/LayoutTests/pointer-lock/locked-element-removed-from-dom.html	2012-07-16 20:44:47 UTC (rev 122757)
+++ trunk/LayoutTests/pointer-lock/locked-element-removed-from-dom.html	2012-07-16 20:48:40 UTC (rev 122758)
@@ -42,6 +42,9 @@
             shouldBe("targetDiv1.parentElement.parentElement", "null");
             // doNextStep called by event handler.
         },
+        function () {
+            // Absorb an extra doNextStep() from previous event handlers.
+        },
     ];
     doNextStep();
 </script>

Modified: trunk/LayoutTests/pointer-lock/resources/pointer-lock-test-harness.js (122757 => 122758)


--- trunk/LayoutTests/pointer-lock/resources/pointer-lock-test-harness.js	2012-07-16 20:44:47 UTC (rev 122757)
+++ trunk/LayoutTests/pointer-lock/resources/pointer-lock-test-harness.js	2012-07-16 20:48:40 UTC (rev 122758)
@@ -12,10 +12,15 @@
     if (typeof(currentStep) == "undefined")
         currentStep = 0;
 
-    if (currentStep < todo.length)
-        setTimeout(function () { todo[currentStep++](); }, 0);
-    else if (currentStep++ == todo.length)
-        setTimeout(function () { finishJSTest(); }, 0);
+    setTimeout(function () {
+        var thisStep = currentStep++;
+        if (thisStep < todo.length)
+            todo[thisStep]();
+        else if (thisStep == todo.length)
+            setTimeout(function () { finishJSTest(); }, 0); // Deferred so that excessive doNextStep calls will be observed.
+        else
+            testFailed("doNextStep called too many times.");
+    }, 0);
 }
 
 function doNextStepWithUserGesture()
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to