Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFC 88: [testdriver] Extend the mechanisms for giving browsing contexts ids. #88

Closed
wants to merge 2 commits into from

Conversation

jgraham
Copy link
Contributor

@jgraham jgraham commented Jul 27, 2021

No description provided.

rfcs/context_uuid.md Outdated Show resolved Hide resolved
rfcs/context_uuid.md Outdated Show resolved Hide resolved
Co-authored-by: Ms2ger <Ms2ger@gmail.com>
@jgraham jgraham changed the title [testdriver] Extend the mechanisms for giving browsing contexts ids. RFC 88: [testdriver] Extend the mechanisms for giving browsing contexts ids. Jul 27, 2021
@jgraham
Copy link
Contributor Author

jgraham commented Jul 30, 2021

There is maybe another option here. Instead of giving each context an id as part of the URL we instead rely on the fact the test window is special, and let the remote window message the test with its id. So something like:

test.html

win.open("child.html", null, "noopener");
let remote_id = await test_driver.recv();
let ctx = test_driver.RemoteContext(remote_id);
ctx.delete_all_cookies();

child.html

test_driver.test_window.send(test_driver.get_context_id())

So there are some problems with this; notably that on a page with multiple subtests you need to make sure you end up gettting the context id for the context that you created. But the advantage is that it avoids the need to expose the uuids directly (and we can imagine an API where they're fully hidden), and that by forcing the child context to signal when its ready, we avoid a race between window.open() and trying to access the context. Obviously in this case the messaging would be via some non-WebDriver channel c.f. #90.

@gsnedders
Copy link
Member

I have some concerns about exposing the property, especially given it's only really needed for WebDriver-based implementations (and, as noted, WebDriver BiDi is unlikely to need it).

That said, I guess we do need to expose some opaque ID to the page for the sake of being able to write testdriver actions that occur on a new window… I do worry that making it part of the URL will lead to multiple IDs longer term (or with non-WebDriver implies today).

So there are some problems with this; notably that on a page with multiple subtests you need to make sure you end up gettting the context id for the context that you created.

Could we have something like: test_driver.open_new_window(url='about:blank'), which returns a Promise which fulfills to a ctx?

@jgraham
Copy link
Contributor Author

jgraham commented Aug 3, 2021

So there are some problems with this; notably that on a page with multiple subtests you need to make sure you end up gettting the context id for the context that you created.

Could we have something like: test_driver.open_new_window(url='about:blank'), which returns a Promise which fulfills to a ctx?

My worry about this is we need to come up with testdriver mechanisms to handle all possible context creation scenarios. For example, what if we want to do the same kind of thing, but with an iframe? Also we want to allow setting different options on the window (e.g. noopnener), so the implementation can't use a WebDriver primitive, it would have to run js script. Then we're back in the situation where we don't know which context is the one we just created on the WebDriver side.

Fundamentally the difficulty here is the need to have a shared identifier for browsing contexts which is accessible both to JS code and to WebDriver/wptrunner. The JS code needs access so that we can specify which context we want to send commands and messages to, and the wptrunner side needs to know which WebDriver window (or frame) we need to switch to when running a specific command. I very much agree that making the user generate these ids explicitly and put them into the URL is not optimal, and in a few years WebDriver-BiDi might be well enough supported to make a different approach possible. So I agree that in the long term we run the risk of having some unfortunate legacy if we go with explicit identifiers. But if there's a clever way to avoid needing them without waiting for BiDi, I haven't yet worked out what it is.

@@ -0,0 +1,114 @@
# RFC 87: `testdriver` Extend the mechanisms for giving browsing contexts ids.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While the RFC title says "browsing contexts ids", is this / should this be actually IDs for Windows (and other realms)?
When we navigate from URL A to URL B (within the same browsing context), we need to, and the draft PR web-platform-tests/wpt#29803 does, distinguish these two.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, it's a bit ambiguous, or rather you can do both. In the PR, if you have an browsing context container with a uuid in the src attribute, that can be used as the uuid irespective of the current url of the loaded document. But if you have a noopener window you'd need to pass the uuid into subsequent URLs loaded in order to keep the same one, or otherwise generate a new one to get a different id for each document loaded. Which you want depends on what you're trying to achieve.

TODO: How should this extend to other resources such as worker scripts. For
current testdriver functionality it doesn't make much sense to run in
a worker, but once we have cross-context messaging we might want to
send messages to a worker we can't access via js.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

COEP tests contain script injection into workers/service workers (executor_js_path and sw_executor_js_path in /wpt/html/cross-origin-embedder-policy/credentialless/resources/common.js). I don't know the details though. FYI @ArthurSonzogni

testdriver will get a new function `get_context_id(ctx)`, with the
following behaviour:
* If `ctx` is a string, return `ctx`.
* If ctx is a WindowProxy with a readable `location.href` which parses
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By the 2-years-in-stable policy I've suggested elsewhere, we could use URLSearchParams:
https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams/URLSearchParams#browser_compatibility

</script>
```

TODO: How should this extend to other resources such as worker scripts. For
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you intend to leave the TODO here?

chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Sep 10, 2021
…e tests + helpers

This PR adds `RemoteContext.execute_script()` and its documentation
in `/common/dispatcher/`.
This is based on with `execute_script()`-related parts of RFCs 88/89/91:

- web-platform-tests/rfcs#88
- web-platform-tests/rfcs#89
- web-platform-tests/rfcs#91

plus additional clarifications around navigation,
minus `testdriver` integration (so this is implemented using
`send()`/`receive()` in `/common/dispatcher/`).

This PR also adds back-forward cache WPTs (basic event firing tests),
as well as BFCache-specific helpers, based on
`RemoteContext.execute_script()`.

Design doc:
https://docs.google.com/document/d/1p3G-qNYMTHf5LU9hykaXcYtJ0k3wYOwcdVKGeps6EkU/edit?usp=sharing

(Note: this CL is tentatively rebased on `main`, to trigger Blink WPT bot,
as this CL depends on
https://chromium-review.googlesource.com/c/chromium/src/+/3033199.
After CL 3033199 lands, this CL should be rebased)

Bug: 1107415
Change-Id: I034f9f5376dc3f9f32ca0b936dbd06e458c9160b
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Sep 16, 2021
…e tests + helpers

This PR adds `RemoteContext.execute_script()` and its documentation
in `/common/dispatcher/`.
This is based on with `execute_script()`-related parts of RFCs 88/89/91:

- web-platform-tests/rfcs#88
- web-platform-tests/rfcs#89
- web-platform-tests/rfcs#91

and addresses comments:

- web-platform-tests/rfcs#86 (comment)
- #28950 (comment)

plus additional clarifications around navigation,
minus `testdriver` integration (so this PR is implemented using
`send()`/`receive()` in `/common/dispatcher/`),
minus web-platform-tests/rfcs#90
(so this PR leaves `send()`/`receive()` as-is).

This PR also adds back-forward cache WPTs (basic event firing tests),
as well as BFCache-specific helpers, based on
`RemoteContext.execute_script()`.

Design doc:
https://docs.google.com/document/d/1p3G-qNYMTHf5LU9hykaXcYtJ0k3wYOwcdVKGeps6EkU/edit?usp=sharing

Bug: 1107415
Change-Id: I034f9f5376dc3f9f32ca0b936dbd06e458c9160b
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Sep 16, 2021
…e tests + helpers

This PR adds `RemoteContext.execute_script()` and its documentation
in `/common/dispatcher/`.
This is based on with `execute_script()`-related parts of RFCs 88/89/91:

- web-platform-tests/rfcs#88
- web-platform-tests/rfcs#89
- web-platform-tests/rfcs#91

and addresses comments:

- web-platform-tests/rfcs#86 (comment)
- #28950 (comment)

plus additional clarifications around navigation,
minus `testdriver` integration (so this PR is implemented using
`send()`/`receive()` in `/common/dispatcher/`),
minus web-platform-tests/rfcs#90
(so this PR leaves `send()`/`receive()` as-is).

This PR also adds back-forward cache WPTs (basic event firing tests),
as well as BFCache-specific helpers, based on
`RemoteContext.execute_script()`.

Design doc:
https://docs.google.com/document/d/1p3G-qNYMTHf5LU9hykaXcYtJ0k3wYOwcdVKGeps6EkU/edit?usp=sharing

Bug: 1107415
Change-Id: I034f9f5376dc3f9f32ca0b936dbd06e458c9160b
@jgraham
Copy link
Contributor Author

jgraham commented Sep 21, 2021

I propose withdrawing this. #98 has an alternative with only the uuid URL parameter part of this change. That seems like the most valuable part of the API surface.

@jgraham jgraham closed this Sep 21, 2021
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Sep 21, 2021
…e tests + helpers

This PR adds `RemoteContext.execute_script()` and its documentation
in `/common/dispatcher/`.
This is based on with `execute_script()`-related parts of RFCs 88/89/91:

- web-platform-tests/rfcs#88
- web-platform-tests/rfcs#89
- web-platform-tests/rfcs#91

and addresses comments:

- web-platform-tests/rfcs#86 (comment)
- #28950 (comment)

plus additional clarifications around navigation,
minus `testdriver` integration (so this PR is implemented using
`send()`/`receive()` in `/common/dispatcher/`),
minus web-platform-tests/rfcs#90
(so this PR leaves `send()`/`receive()` as-is).

This PR also adds back-forward cache WPTs (basic event firing tests),
as well as BFCache-specific helpers, based on
`RemoteContext.execute_script()`.

Design doc:
https://docs.google.com/document/d/1p3G-qNYMTHf5LU9hykaXcYtJ0k3wYOwcdVKGeps6EkU/edit?usp=sharing

Bug: 1107415
Change-Id: I034f9f5376dc3f9f32ca0b936dbd06e458c9160b
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Sep 23, 2021
…e tests + helpers

This PR adds `RemoteContext.execute_script()` and its documentation
in `/common/dispatcher/`.
This is based on with `execute_script()`-related parts of RFCs 88/89/91:

- web-platform-tests/rfcs#88
- web-platform-tests/rfcs#89
- web-platform-tests/rfcs#91

and addresses comments:

- web-platform-tests/rfcs#86 (comment)
- #28950 (comment)

plus additional clarifications around navigation,
minus `testdriver` integration (so this PR is implemented using
`send()`/`receive()` in `/common/dispatcher/`),
minus web-platform-tests/rfcs#90
(so this PR leaves `send()`/`receive()` as-is).

This PR also adds back-forward cache WPTs (basic event firing tests),
as well as BFCache-specific helpers, based on
`RemoteContext.execute_script()`.

Design doc:
https://docs.google.com/document/d/1p3G-qNYMTHf5LU9hykaXcYtJ0k3wYOwcdVKGeps6EkU/edit?usp=sharing

Bug: 1107415
Change-Id: I034f9f5376dc3f9f32ca0b936dbd06e458c9160b
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Sep 23, 2021
…e tests + helpers

This PR adds `RemoteContext.execute_script()` and its documentation
in `/common/dispatcher/`.
This is based on with `execute_script()`-related parts of RFCs 88/89/91:

- web-platform-tests/rfcs#88
- web-platform-tests/rfcs#89
- web-platform-tests/rfcs#91

and addresses comments:

- web-platform-tests/rfcs#86 (comment)
- #28950 (comment)

plus additional clarifications around navigation,
minus `testdriver` integration (so this PR is implemented using
`send()`/`receive()` in `/common/dispatcher/`),
minus web-platform-tests/rfcs#90
(so this PR leaves `send()`/`receive()` as-is).

This PR also adds back-forward cache WPTs (basic event firing tests),
as well as BFCache-specific helpers, based on
`RemoteContext.execute_script()`.

Design doc:
https://docs.google.com/document/d/1p3G-qNYMTHf5LU9hykaXcYtJ0k3wYOwcdVKGeps6EkU/edit?usp=sharing

Bug: 1107415
Change-Id: I034f9f5376dc3f9f32ca0b936dbd06e458c9160b
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Sep 29, 2021
…e tests + helpers

This PR adds `RemoteContext.execute_script()` and its documentation
in `/common/dispatcher/`.
This is based on with `execute_script()`-related parts of RFCs 88/89/91:

- web-platform-tests/rfcs#88
- web-platform-tests/rfcs#89
- web-platform-tests/rfcs#91

and addresses comments:

- web-platform-tests/rfcs#86 (comment)
- #28950 (comment)

plus additional clarifications around navigation,
minus `testdriver` integration (so this PR is implemented using
`send()`/`receive()` in `/common/dispatcher/`),
minus web-platform-tests/rfcs#90
(so this PR leaves `send()`/`receive()` as-is).

This PR also adds back-forward cache WPTs (basic event firing tests),
as well as BFCache-specific helpers, based on
`RemoteContext.execute_script()`.

Design doc:
https://docs.google.com/document/d/1p3G-qNYMTHf5LU9hykaXcYtJ0k3wYOwcdVKGeps6EkU/edit?usp=sharing

Bug: 1107415
Change-Id: I034f9f5376dc3f9f32ca0b936dbd06e458c9160b
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Oct 4, 2021
…e tests + helpers

This PR adds `RemoteContext.execute_script()` and its documentation
in `/common/dispatcher/`.
This is based on with `execute_script()`-related parts of RFCs 88/89/91:

- web-platform-tests/rfcs#88
- web-platform-tests/rfcs#89
- web-platform-tests/rfcs#91

and addresses comments:

- web-platform-tests/rfcs#86 (comment)
- #28950 (comment)

plus additional clarifications around navigation,
minus `testdriver` integration (so this PR is implemented using
`send()`/`receive()` in `/common/dispatcher/`),
minus web-platform-tests/rfcs#90
(so this PR leaves `send()`/`receive()` as-is).

This PR also adds back-forward cache WPTs (basic event firing tests),
as well as BFCache-specific helpers, based on
`RemoteContext.execute_script()`.

Design doc:
https://docs.google.com/document/d/1p3G-qNYMTHf5LU9hykaXcYtJ0k3wYOwcdVKGeps6EkU/edit?usp=sharing

Bug: 1107415
Change-Id: I034f9f5376dc3f9f32ca0b936dbd06e458c9160b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2885636
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org>
Cr-Commit-Position: refs/heads/main@{#927566}
blueboxd pushed a commit to blueboxd/chromium-legacy that referenced this pull request Oct 4, 2021
…e tests + helpers

This PR adds `RemoteContext.execute_script()` and its documentation
in `/common/dispatcher/`.
This is based on with `execute_script()`-related parts of RFCs 88/89/91:

- web-platform-tests/rfcs#88
- web-platform-tests/rfcs#89
- web-platform-tests/rfcs#91

and addresses comments:

- web-platform-tests/rfcs#86 (comment)
- web-platform-tests/wpt#28950 (comment)

plus additional clarifications around navigation,
minus `testdriver` integration (so this PR is implemented using
`send()`/`receive()` in `/common/dispatcher/`),
minus web-platform-tests/rfcs#90
(so this PR leaves `send()`/`receive()` as-is).

This PR also adds back-forward cache WPTs (basic event firing tests),
as well as BFCache-specific helpers, based on
`RemoteContext.execute_script()`.

Design doc:
https://docs.google.com/document/d/1p3G-qNYMTHf5LU9hykaXcYtJ0k3wYOwcdVKGeps6EkU/edit?usp=sharing

Bug: 1107415
Change-Id: I034f9f5376dc3f9f32ca0b936dbd06e458c9160b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2885636
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org>
Cr-Commit-Position: refs/heads/main@{#927566}
past pushed a commit to web-platform-tests/wpt that referenced this pull request Oct 6, 2021
…e tests + helpers (#28950)

This PR adds `RemoteContext.execute_script()` and its documentation
in `/common/dispatcher/`.
This is based on with `execute_script()`-related parts of RFCs 88/89/91:

- web-platform-tests/rfcs#88
- web-platform-tests/rfcs#89
- web-platform-tests/rfcs#91

and addresses comments:

- web-platform-tests/rfcs#86 (comment)
- #28950 (comment)

plus additional clarifications around navigation,
minus `testdriver` integration (so this PR is implemented using
`send()`/`receive()` in `/common/dispatcher/`),
minus web-platform-tests/rfcs#90
(so this PR leaves `send()`/`receive()` as-is).

This PR also adds back-forward cache WPTs (basic event firing tests),
as well as BFCache-specific helpers, based on
`RemoteContext.execute_script()`.

Design doc:
https://docs.google.com/document/d/1p3G-qNYMTHf5LU9hykaXcYtJ0k3wYOwcdVKGeps6EkU/edit?usp=sharing

Bug: 1107415
Change-Id: I034f9f5376dc3f9f32ca0b936dbd06e458c9160b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2885636
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org>
Cr-Commit-Position: refs/heads/main@{#927566}

Co-authored-by: Hiroshige Hayashizaki <hiroshige@chromium.org>
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Oct 13, 2021
…cript()` and add basic BFCache tests + helpers, a=testonly

Automatic update from web-platform-tests
[WPT] Introduce `RemoteContext.execute_script()` and add basic BFCache tests + helpers (#28950)

This PR adds `RemoteContext.execute_script()` and its documentation
in `/common/dispatcher/`.
This is based on with `execute_script()`-related parts of RFCs 88/89/91:

- web-platform-tests/rfcs#88
- web-platform-tests/rfcs#89
- web-platform-tests/rfcs#91

and addresses comments:

- web-platform-tests/rfcs#86 (comment)
- web-platform-tests/wpt#28950 (comment)

plus additional clarifications around navigation,
minus `testdriver` integration (so this PR is implemented using
`send()`/`receive()` in `/common/dispatcher/`),
minus web-platform-tests/rfcs#90
(so this PR leaves `send()`/`receive()` as-is).

This PR also adds back-forward cache WPTs (basic event firing tests),
as well as BFCache-specific helpers, based on
`RemoteContext.execute_script()`.

Design doc:
https://docs.google.com/document/d/1p3G-qNYMTHf5LU9hykaXcYtJ0k3wYOwcdVKGeps6EkU/edit?usp=sharing

Bug: 1107415
Change-Id: I034f9f5376dc3f9f32ca0b936dbd06e458c9160b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2885636
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org>
Cr-Commit-Position: refs/heads/main@{#927566}

Co-authored-by: Hiroshige Hayashizaki <hiroshige@chromium.org>
--

wpt-commits: 2947a57c382cd0886906a8cbb6bad702d70a7976
wpt-pr: 28950
jamienicol pushed a commit to jamienicol/gecko that referenced this pull request Oct 14, 2021
…cript()` and add basic BFCache tests + helpers, a=testonly

Automatic update from web-platform-tests
[WPT] Introduce `RemoteContext.execute_script()` and add basic BFCache tests + helpers (#28950)

This PR adds `RemoteContext.execute_script()` and its documentation
in `/common/dispatcher/`.
This is based on with `execute_script()`-related parts of RFCs 88/89/91:

- web-platform-tests/rfcs#88
- web-platform-tests/rfcs#89
- web-platform-tests/rfcs#91

and addresses comments:

- web-platform-tests/rfcs#86 (comment)
- web-platform-tests/wpt#28950 (comment)

plus additional clarifications around navigation,
minus `testdriver` integration (so this PR is implemented using
`send()`/`receive()` in `/common/dispatcher/`),
minus web-platform-tests/rfcs#90
(so this PR leaves `send()`/`receive()` as-is).

This PR also adds back-forward cache WPTs (basic event firing tests),
as well as BFCache-specific helpers, based on
`RemoteContext.execute_script()`.

Design doc:
https://docs.google.com/document/d/1p3G-qNYMTHf5LU9hykaXcYtJ0k3wYOwcdVKGeps6EkU/edit?usp=sharing

Bug: 1107415
Change-Id: I034f9f5376dc3f9f32ca0b936dbd06e458c9160b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2885636
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org>
Cr-Commit-Position: refs/heads/main@{#927566}

Co-authored-by: Hiroshige Hayashizaki <hiroshige@chromium.org>
--

wpt-commits: 2947a57c382cd0886906a8cbb6bad702d70a7976
wpt-pr: 28950
Gabisampaio pushed a commit to Gabisampaio/wpt that referenced this pull request Nov 18, 2021
…e tests + helpers (web-platform-tests#28950)

This PR adds `RemoteContext.execute_script()` and its documentation
in `/common/dispatcher/`.
This is based on with `execute_script()`-related parts of RFCs 88/89/91:

- web-platform-tests/rfcs#88
- web-platform-tests/rfcs#89
- web-platform-tests/rfcs#91

and addresses comments:

- web-platform-tests/rfcs#86 (comment)
- web-platform-tests#28950 (comment)

plus additional clarifications around navigation,
minus `testdriver` integration (so this PR is implemented using
`send()`/`receive()` in `/common/dispatcher/`),
minus web-platform-tests/rfcs#90
(so this PR leaves `send()`/`receive()` as-is).

This PR also adds back-forward cache WPTs (basic event firing tests),
as well as BFCache-specific helpers, based on
`RemoteContext.execute_script()`.

Design doc:
https://docs.google.com/document/d/1p3G-qNYMTHf5LU9hykaXcYtJ0k3wYOwcdVKGeps6EkU/edit?usp=sharing

Bug: 1107415
Change-Id: I034f9f5376dc3f9f32ca0b936dbd06e458c9160b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2885636
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org>
Cr-Commit-Position: refs/heads/main@{#927566}

Co-authored-by: Hiroshige Hayashizaki <hiroshige@chromium.org>
mjfroman pushed a commit to mjfroman/moz-libwebrtc-third-party that referenced this pull request Oct 14, 2022
…e tests + helpers

This PR adds `RemoteContext.execute_script()` and its documentation
in `/common/dispatcher/`.
This is based on with `execute_script()`-related parts of RFCs 88/89/91:

- web-platform-tests/rfcs#88
- web-platform-tests/rfcs#89
- web-platform-tests/rfcs#91

and addresses comments:

- web-platform-tests/rfcs#86 (comment)
- web-platform-tests/wpt#28950 (comment)

plus additional clarifications around navigation,
minus `testdriver` integration (so this PR is implemented using
`send()`/`receive()` in `/common/dispatcher/`),
minus web-platform-tests/rfcs#90
(so this PR leaves `send()`/`receive()` as-is).

This PR also adds back-forward cache WPTs (basic event firing tests),
as well as BFCache-specific helpers, based on
`RemoteContext.execute_script()`.

Design doc:
https://docs.google.com/document/d/1p3G-qNYMTHf5LU9hykaXcYtJ0k3wYOwcdVKGeps6EkU/edit?usp=sharing

Bug: 1107415
Change-Id: I034f9f5376dc3f9f32ca0b936dbd06e458c9160b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2885636
Reviewed-by: Rakina Zata Amni <rakina@chromium.org>
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Commit-Queue: Hiroshige Hayashizaki <hiroshige@chromium.org>
Cr-Commit-Position: refs/heads/main@{#927566}
NOKEYCHECK=True
GitOrigin-RevId: 66dbd4c686fec8d07c493c6283ab906c57752e39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants