Improve some webdriver conformance tests results (#36673)

These changes allow test_dom_token_list from
/execute_script/collections.py to pass, and various tests in
/execute_script/arguments.py to expose new failures.

Testing: Not run in CI yet, but verified results from
tests/wpt/tests/webdriver/tests/classic/{execute_script,execute_async_script}
locally.
Fixes: #35738

---------

Signed-off-by: Josh Matthews <josh@joshmatthews.net>
This commit is contained in:
Josh Matthews 2025-05-07 03:22:29 -04:00 committed by GitHub
parent a18c6e2c78
commit f47e69c112
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
28 changed files with 128 additions and 165 deletions

View file

@ -532,7 +532,7 @@ where
/// Returns whether `value` is an array-like object (Array, FileList,
/// HTMLCollection, HTMLFormControlsCollection, HTMLOptionsCollection,
/// NodeList).
/// NodeList, DOMTokenList).
///
/// # Safety
/// `cx` must point to a valid, non-null JSContext.
@ -548,6 +548,10 @@ pub unsafe fn is_array_like<D: crate::DomTypes>(cx: *mut JSContext, value: Handl
_ => return false,
};
// TODO: HTMLAllCollection
if root_from_object::<D::DOMTokenList>(object, cx).is_ok() {
return true;
}
if root_from_object::<D::FileList>(object, cx).is_ok() {
return true;
}