Commit 0b4205ec authored by scheib@chromium.org's avatar scheib@chromium.org

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.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122758 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent cf799ebd
2012-07-16 Vincent Scheib <scheib@chromium.org>
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 <fmalita@chromium.org>
SVGAnimationElement::currentValuesForValuesAnimation crash
......@@ -3728,9 +3728,6 @@ BUGWK90900 MAC : tables/mozilla_expected_failures/other/empty_cells.html = PASS
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
......
......@@ -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>
......
......@@ -12,10 +12,15 @@ function doNextStep()
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()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment