[WebDriver] Grant top_level_script_command and browsing_context_script_command freedom to not verify existence of pipeline (#37632)

Sometimes, it is redundant to verify existence of pipeline over and over
again.
Sometimes, it is just wrong to check it. See [Switch to Parent
Frame](https://w3c.github.io/webdriver/#switch-to-parent-frame), where
we only care about existence of parent frame.
1. This PR adds a constant compile-time bool flag to enable this. This
will be essential to fix "no_browsing_context" next.
2. Fix some wrong usage of `top_level_script_command` in `is_selected`
and `is_enabled`.
3. Add and unify some WARN info related to pipeline in Constellation

Testing: All WebDriver test with new passing cases

---------

Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
This commit is contained in:
Euclid Ye 2025-06-24 14:42:34 +08:00 committed by GitHub
parent e0f3679d55
commit 94a7428912
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 65 additions and 65 deletions

View file

@ -764,10 +764,9 @@ impl Handler {
web_element: &WebElement,
) -> Result<(i64, i64), ErrorStatus> {
let (sender, receiver) = ipc::channel().unwrap();
self.browsing_context_script_command(WebDriverScriptCommand::GetElementInViewCenterPoint(
web_element.to_string(),
sender,
))
self.browsing_context_script_command::<false>(
WebDriverScriptCommand::GetElementInViewCenterPoint(web_element.to_string(), sender),
)
.unwrap();
let response = match wait_for_script_response(receiver) {
Ok(response) => response,