mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 02:47:35 +00:00
LibWeb/WebDriver: Handle WindowProxy in internal_json_clone_algorithm()
To test: ```console curl http://0.0.0.0:8000/session \ -H 'Content-Type: application/json' \ -d '{"capabilities": {}}' curl http://0.0.0.0:8000/session/0/execute/sync \ -H 'Content-Type: application/json' \ -d '{"script": "return window;", "args": []}' ``` Which should result in: ```json { "value": { "window-fcc6-11e5-b4f8-330a88ab9d7f": "86307df6-e2f1-4175-85cb-77295ff90898" } } ```
This commit is contained in:
parent
84a231d4e5
commit
e6be5c37c0
8 changed files with 88 additions and 5 deletions
23
Userland/Libraries/LibWeb/WebDriver/Contexts.h
Normal file
23
Userland/Libraries/LibWeb/WebDriver/Contexts.h
Normal file
|
@ -0,0 +1,23 @@
|
|||
/*
|
||||
* Copyright (c) 2023, Linus Groh <linusg@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <AK/Forward.h>
|
||||
#include <AK/StringView.h>
|
||||
#include <LibWeb/Forward.h>
|
||||
|
||||
namespace Web::WebDriver {
|
||||
|
||||
// https://w3c.github.io/webdriver/#dfn-web-window-identifier
|
||||
static constexpr auto WEB_WINDOW_IDENTIFIER = "window-fcc6-11e5-b4f8-330a88ab9d7f"sv;
|
||||
|
||||
// https://w3c.github.io/webdriver/#dfn-web-frame-identifier
|
||||
static constexpr auto WEB_FRAME_IDENTIFIER = "frame-075b-4da1-b6ba-e579c2d3230a"sv;
|
||||
|
||||
JsonObject window_proxy_reference_object(HTML::WindowProxy const&);
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue