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>
- 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>
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>
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>
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>