-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
webdriver: Evaluate script commands via the WebView
API in servoshell
#37663
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
Conversation
819e22e
to
a179956
Compare
What's the motivation here. Is there any related issue? |
This PR is a follow up of #36714 (comment) |
I am a bit worried about I notice that the test execution speed goes down significantly after #36714. There seems to be an extra round of waiting after each subtest. Previously, it almost has no delay. (For example, many tests which used to took 4 seconds now took 30+ seconds. Probably because |
We need to move all commands to servoshell then evaluate again. |
I knew that. But I never think it is good idea to move commands that just does forwarding.
No it is not TIMEOUT. Please run the test and check for yourself. Maybe checkout before #36714. Please read "There seems to be an extra round of waiting after each subtest." |
It serves the purpose of synchronization. If script event has shorter route, it may be done out of order with others. In that case, we need to add a wait as well.
Maybe you want to run with #37555 or #37665 I run the CI quite frequently, and with #37555, the time is similar as before. |
I definitely agree that navigation command should be moved. It is just that, previously it immediately switches to the next subtest.. My eyes even cannot catch the speed. Right now there is a 1 second gap between each, leading to greatly increased total time. I'll investigate more once recovered.
That makes sense. Thanks for clarification❤️ @longvatrong111 |
Let's move this one last. I will also check tests with all pieces of moving commands. Thank you. |
a179956
to
5ea68e0
Compare
This one looks pretty straightforward, but please request another review from me when it's ready to merge. Thanks! |
We have more reason to move ScriptCommand to servoshell: #35734 (comment) |
…ndowSize` (#37712) 1. Remove the unnecessary new thread which use GetWindowRect command and blocks for 500ms. Previously this is necessary because constellation forward "resize" to embedder, and WebDriver wait for a constant sufficient time to `GetWindowRect` in the new thread. This caused long delay because there are many subtests and SetWindowRect is called between each. 2. Remove `resize_timeout` 3. Return current dimension instead of 0 from embedder when it fails to resize. 4. Do resizing as long as one of width/height is `Some`, according to spec. Testing: All Conformance test with new passing cases. Fixes: #37663 (comment) --------- Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
fdb1500
to
87a1668
Compare
Update expected test result based on: https://github.com/longvatrong111/servo/actions/runs/16120879305 |
This is confusing. Why these test expectations were newly added yesterday in 9afe027, but reverted again today? |
I see. So Test result in this PR is updated according to https://github.com/longvatrong111/servo/actions/runs/16120879305 |
Current test result, some unexpected results remain because of intermittent result or CI give different result with local. |
e0023dc
to
0f5224a
Compare
🔨 Triggering try run (#16151610342) for Linux (WPT) |
Test results for linux-wpt from try job (#16151610342): Flaky unexpected result (17)
Stable unexpected results that are known to be intermittent (24)
|
✨ Try run (#16151610342) succeeded. |
Hi @mrobinson, I think this one is ready to be merged. |
0f5224a
to
1e78893
Compare
Signed-off-by: batu_hoang <longvatrong111@gmail.com>
Signed-off-by: batu_hoang <longvatrong111@gmail.com>
1e78893
to
3ec4f85
Compare
WebView
API in servoshell
e7a259d
to
03c16e4
Compare
// From <https://w3c.github.io/webdriver/#dfn-execute-a-function-body>: | ||
// > The rules to execute a function body are as follows. The algorithm returns | ||
// > an ECMAScript completion record. | ||
// > | ||
// > If at any point during the algorithm a user prompt appears, immediately return | ||
// > Completion { Type: normal, Value: null, Target: empty }, but continue to run the | ||
// > other steps of this algorithm in parallel. |
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.
// From <https://w3c.github.io/webdriver/#dfn-execute-a-function-body>: | |
// > The rules to execute a function body are as follows. The algorithm returns | |
// > an ECMAScript completion record. | |
// > | |
// > If at any point during the algorithm a user prompt appears, immediately return | |
// > Completion { Type: normal, Value: null, Target: empty }, but continue to run the | |
// > other steps of this algorithm in parallel. | |
/// From <https://w3c.github.io/webdriver/#dfn-execute-a-function-body>: | |
/// > The rules to execute a function body are as follows. The algorithm returns | |
/// > an ECMAScript completion record. | |
// > | |
/// > If at any point during the algorithm a user prompt appears, immediately return | |
/// > Completion { Type: normal, Value: null, Target: empty }, but continue to run the | |
/// > other steps of this algorithm in parallel. |
- Avoid cloning the entire WebDriver message. Just clone the sender. - Adjust the documentation to be rustdoc. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
03c16e4
to
b2891e2
Compare
Let
WebDriverCommandMsg::ScriptCommand
goes through embedder first.Give
embedder
the ability to releasewebdriver
from waiting for a response ofExecuteScript
.Tests: https://github.com/longvatrong111/servo/actions/runs/16071375821
No regression compared to CI run on main branch.
Fixes: #37370
cc: @xiaochengh