New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Address flaky test case scroll-into-view-and-show-validation-message.html when run using WK1 #977
Address flaky test case scroll-into-view-and-show-validation-message.html when run using WK1 #977
Conversation
setTimeout(function() { | ||
eventSender.mouseMoveTo(90, 20); | ||
eventSender.mouseDown(); | ||
eventSender.mouseUp(); | ||
if (ta.selectionEnd == 17) | ||
res.innerHTML = "Test Succeeded"; | ||
else | ||
res.innerHTML = "Test Failed: caret is at " + ta.selectionEnd; | ||
testRunner.notifyDone(); | ||
}, 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems what you're waiting for here is the next rendering update?
There's a helper method, UIHelper.renderingUpdate()
, in ui-helper.js
that you might find useful here:
UIHelper.renderingUpdate().then(() => {
eventSender.mouseMoveTo(90, 20);
eventSender.mouseDown();
eventSender.mouseUp();
if (ta.selectionEnd == 17)
res.innerHTML = "Test Succeeded";
else
res.innerHTML = "Test Failed: caret is at " + ta.selectionEnd;
testRunner.notifyDone();
});
(or, if you want to make this an async function
):
await UIHelper.renderingUpdate();
eventSender.mouseMoveTo(90, 20);
eventSender.mouseDown();
eventSender.mouseUp();
if (ta.selectionEnd == 17)
res.innerHTML = "Test Succeeded";
else
res.innerHTML = "Test Failed: caret is at " + ta.selectionEnd;
testRunner.notifyDone();
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I'll take a look into this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is what I had in mind:
https://gist.github.com/whsieh/0d3201cab31ac31ff4643c0faaefa8f5
bda0fd6
to
3260728
Compare
3260728
to
06b95d5
Compare
Committed r294868 (250998@main): https://commits.webkit.org/250998@main Reviewed commits have been landed. Closing PR #977 and removing active labels. |
…i/2.38/relax_user_agent_validation Relax user agent validation
06b95d5