Commit Graph

7 Commits

Author SHA1 Message Date
Timothy Flynn
bb58a048fc LibWeb+WebContent+WebDriver: Implement the Perform Actions endpoint
Similar to script execution, this spins the WebDriver process until the
action is complete (rather than spinning the WebContent process, which
we've seen result in deadlocks).

(cherry picked from commit 709deeb482a6433abbcb194551788bc5409166f4)
2024-11-24 19:40:10 -05:00
Timothy Flynn
c5502d324c LibWeb: Implement WebDriver pointer action execution
This implements execution of the pointer up, pointer down, and pointer
move actions.

This isn't 100% complete. Pointer move actions are supposed to break
the move into iterations over the specified duration, which we currently
do not do.

(cherry picked from commit 8000837f7821fe9854156c7ae1349d37c77e89b2)
2024-11-24 19:40:10 -05:00
Timothy Flynn
f93a00718b LibWeb+WebContent: Partially implement WebDriver's JSON deserialize AO
In particular, we need to convert web element references to the actual
element. The AO isn't fully implemented because we will need to work out
mixing JsonValue types with JS value types, which currently isn't very
straight forward with our JSON clone algorithm.

(cherry picked from commit 94c243acd6873a9fd9115f1467093326392f06c0)
2024-11-24 19:40:10 -05:00
Timothy Flynn
b529e1a0a1 LibWeb: Form the correct representation of a WebDriver element reference
We are currently returning a JSON object of the form:

    {
        "name": "element-6066-11e4-a52e-4f735466cecf",
        "value": "foo"
    }

Instead, we are expected to return an object of the form:

    {
        "element-6066-11e4-a52e-4f735466cecf": "foo"
    }

(cherry picked from commit 157d41bb0dae1ab3b04e079a72184b99f2137c5c)
2024-11-24 19:40:10 -05:00
Timothy Flynn
d53bed5882 LibWeb+WebContent: Partially implement the switch-to-frame endpoint
This is needed by the cookie tests for WPT.

(cherry picked from commit 60fa3752ee8c6eecc1e338c8ebebba2e288eea35)
2024-11-24 15:19:49 -05:00
Timothy Flynn
0e87ab0b2e LibWeb+WebContent: Implement the WebDriver JSON clone steps for elements
This is needed by WPT to serialize NodeList instances.

(cherry picked from commit bf60765903d459f98098e2ba82246028ceaa8125)
2024-11-24 15:19:49 -05:00
Timothy Flynn
b7f11fe893 LibWeb+WebContent: Move element reference WebDriver AOs to a helper file
These will be needed outside of WebDriverConnection.cpp.

(cherry picked from commit 2dc8cad7857878637a6850da272cb6539d890786)
2024-11-24 15:19:49 -05:00