Commit Graph

6 Commits

Author SHA1 Message Date
Euclid Ye
cae0752676 cargo: Rename workspace-local library starting with b to servo_* (#43552)
Follow up of #43526. This addresses Nico's comment:
https://github.com/servo/servo/pull/43526#issuecomment-4104953308

- `bluetooth_traits` -> `servo_bluetooth_traits`
- `base` -> `servo_base`
- `bluetooth` -> `servo_bluetooth`
- `background_hang_monitor` -> `servo_background_hang_monitor`

Testing: This should not change any behaviour.

---------

Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
2026-03-23 08:26:49 +00:00
Narfinger
1b0bd11e11 Use GenericSender and GenericReceiver for WebDriver (#40987)
- Use the generic channel for webdriver.
- Implement try_receive_timeout for GenericReceiver.

Testing: WPT should still work.

---------

Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
2025-12-19 03:22:02 +00:00
Euclid Ye
90e7a2276a webdriver: Miscellanous cleanup (#39986)
Cleanup ipc response flattening, visibility, and manually defined
constant.

Testing: No behaviour change. Existing tests suffice.

Signed-off-by: Euclid <yezhizhenjiakang@gmail.com>
2025-10-21 15:58:20 +00:00
Euclid Ye
bf42488da8 webdriver: Report error instead of panic for invalid WebElement&ShadowRoot reference (#39976)
It is possible that the reference of `WebElement` and `ShadowRoot` in
the request is not String. Instead of panic, we should return "invalid
argument" same as the `WebWindow` and `WebFrame`.

Testing: Added 4 new subtests. There was only tests for `WebWindow` and
`WebFrame` somehow.

---------

Signed-off-by: Euclid <yezhizhenjiakang@gmail.com>
2025-10-18 10:44:05 +00:00
Euclid Ye
5e020146f1 webdriver: Deserialize WebFrame and report error correctly for script execution + Fix wrong tests (#39919)
This is ~slightly~ quite different from the last PR for `WebWindow`.
This time, we need to consult constellation to verify the existence of
browsing context, without diving into script. But constellation requires
`BrowsingContextId` object to check the HashMap. As a result, we added a
regex check to convert the given `reference: string` to
`BrowsingContextId`.

Testing: 14 newly passing tests. Two of them are newly created, as
previous tests themselves are wrong and outdated with spec. We now fully
pass `execute_{async_}script/arguments.py`.

---------

Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
2025-10-17 11:00:53 +00:00
Euclid Ye
8971f69143 webdriver: Deserialize WebWindow and report error correctly for script execution (#39885)
We were relying on `fn WebdriverWindow` to report `NoSuchWindow` during
script execution, regardless of the fact that it is never `Fallible`. I
was really hoping to refactor this to return `Fallible` to reduce one
RTT of IPC, but there is no easy way to convert between DOM exception
56b806b129/components/script_bindings/error.rs (L15)
and JavaScriptEvaluationError
56b806b129/components/shared/embedder/lib.rs (L1092).

We also migrate `element.rs` to `script_argument_extraction.rs` to
reflect the true purpose of the file.

Testing: 10 new subtests passing.

---------

Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
2025-10-16 03:26:27 +00:00