-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
[WPT] Introduce RemoteContext.execute_script()
and add basic BFCache tests + helpers
#28950
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The review process for this patch is being conducted in the Chromium project.
a9ac8e5
to
8643a40
Compare
8643a40
to
ffbc29e
Compare
467bf8a
to
dc478ba
Compare
Hi people around #16359, This PR sketches how BFCache WPTs can be written, using a basic test on event firing. As for Fergal's proposal at #16359 (comment): I put some other details in the description and comments within the JS files. WDYT? Suggestions are welcome. cc/ @jugglinmike @gsnedders @annevk @zcorpan @fergald @smaug---- @cdumez @rakina @domenic @jakearchibald @foolip who might have opinions. |
@past are you able to help out reviewing this? I'll also take a look, but it's an important new bit of test infrastructure, and it'd be good to have more eyes on it. |
Just a thought without having reviewed the code yet...
Is this limitation a big problem, are there ways of supporting that you've considered that seem too intrusive or too much work? There are quite a lot of tests that need this I think and they end up opening an iframe. Do you think the iframe trick will work for BFCache too, or won't this be a problem? |
Opening an iframe for bfcache tests? bfcache is for top level pages only (at least in certain implementation, since supporting iframes is tricky and probably not that useful). |
We can't open a new window because we cannot cache a page that has another window in the same browsing context group. Basically if something else can script it or send messages to it then it cannot enter the cache. Local storage provides a way to communicate and still be cacheable. This is definitely not ideal and would not be necessary if we had something like |
Yes you can cache new windows, if they are opened using noopener :) |
The combination of top-level cross-site navigations, isolated windows, BFCache eligibility (i.e. Windows opened by Alternatives considered for
Alternatives considered for localStorage:
Anyway these things might be just workarounds and not perfect, and I'm also thinking of more generalized/cleaner framework for navigation-related tests. Maybe test runner/WebDriver APIs? Maybe a test is controlled from outside, like from main test Document or even outside HTML? Maybe the test state is in persistent storage (e.g. stash)? But I haven't come up with concrete ideas yet. |
I misspoke in my previous question, I wanted to ask about
I can see two things that might be helpful here:
|
Status: |
5e2f7cb
to
9e8ad69
Compare
OK, I switched this PR (and my other drafts) to the COEP's executor framework, and thus dropped the changes to I also removed Ready for code review again. WDYT? |
html/browsers/browsing-the-web/back-forward-cache/resources/helper.sub.js
Outdated
Show resolved
Hide resolved
9e8ad69
to
1a20d7c
Compare
I haven't reviewed this in detail, but I'm happy with the general shape of the |
…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
a7f3831
to
b05460d
Compare
…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
b05460d
to
ed918f4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM on my side.
Any more comments or suggestions? |
…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
ed918f4
to
834440f
Compare
…amework to /common, a=testonly Automatic update from web-platform-tests [WPT] Move/merge COEP/COOP dispatcher framework to /common (#29684) To reduce duplication and prepare for using this framework for BFCache (web-platform-tests/wpt#28950), this CL merges two sets of dispatcher/executor files under COEP and COOP and move them to `/common`. Relevant discussion is also in web-platform-tests/rfcs#89. Most of the changes are simple path renaming, except for: - Service worker's scope is also moved to `/common/dispatcher/` in: /wpt/html/cross-origin-embedder-policy/credentialless/service-worker-coep-credentialless-proxy.tentative.https.html /wpt/html/cross-origin-embedder-policy/credentialless/service-worker-coep-none-proxy.tentative.https.html /wpt/html/cross-origin-opener-policy/popup-coop-by-sw.https.html because the service workers should control executors. - Diffs between COEP and COOP dispatchers are merged, but are trivial (e.g. some functionality exists only one of them, like 6 concurrent accesses to the server, retrying on failure, Access-Control-Allow-Credentials in dispatcher, etc.). - Reporting-related part of `dispatcher.js` is moved to /wpt/html/cross-origin-opener-policy/reporting/resources/reporting-common.js. - README.md about the dispatcher is moved and added. - /wpt/html/cross-origin-embedder-policy/credentialless/resources/cacheable-response.py is also merged into dispatcher.py, because they should access the same stash and already have common code. - Stash paths are moved to '/common/dispatcher'. - `executer.js` and `sw_executer.js` are moved to `executer-worker.js` and `executer-service-worker.js`, respectively, to clarify they are worker scripts, rather than helpers. - Timeout in receive() is removed because no one uses that parameter. - Duplicated/unused const declarations are removed. Bug: 1107415 Change-Id: I0d28e7f4b4cca6599562ac4766a326880139028d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3033199 Commit-Queue: Hiroshige Hayashizaki <[email protected]> Reviewed-by: Arthur Sonzogni <[email protected]> Reviewed-by: Kouhei Ueno <[email protected]> Cr-Commit-Position: refs/heads/main@{#921511} Co-authored-by: Hiroshige Hayashizaki <[email protected]> -- wpt-commits: bb06b9cd1abb9467a296177d468da156f6df2bbc wpt-pr: 29684
…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 <[email protected]> Reviewed-by: Arthur Sonzogni <[email protected]> Commit-Queue: Hiroshige Hayashizaki <[email protected]> Cr-Commit-Position: refs/heads/main@{#927566}
834440f
to
e71e5fa
Compare
The underlying Chromium CL has landed. The failures on stability bots are existing flakiness in COOP tests and thus are not related to this PR. |
…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 <[email protected]> Reviewed-by: Arthur Sonzogni <[email protected]> Commit-Queue: Hiroshige Hayashizaki <[email protected]> Cr-Commit-Position: refs/heads/main@{#927566}
…amework to /common, a=testonly Automatic update from web-platform-tests [WPT] Move/merge COEP/COOP dispatcher framework to /common (#29684) To reduce duplication and prepare for using this framework for BFCache (web-platform-tests/wpt#28950), this CL merges two sets of dispatcher/executor files under COEP and COOP and move them to `/common`. Relevant discussion is also in web-platform-tests/rfcs#89. Most of the changes are simple path renaming, except for: - Service worker's scope is also moved to `/common/dispatcher/` in: /wpt/html/cross-origin-embedder-policy/credentialless/service-worker-coep-credentialless-proxy.tentative.https.html /wpt/html/cross-origin-embedder-policy/credentialless/service-worker-coep-none-proxy.tentative.https.html /wpt/html/cross-origin-opener-policy/popup-coop-by-sw.https.html because the service workers should control executors. - Diffs between COEP and COOP dispatchers are merged, but are trivial (e.g. some functionality exists only one of them, like 6 concurrent accesses to the server, retrying on failure, Access-Control-Allow-Credentials in dispatcher, etc.). - Reporting-related part of `dispatcher.js` is moved to /wpt/html/cross-origin-opener-policy/reporting/resources/reporting-common.js. - README.md about the dispatcher is moved and added. - /wpt/html/cross-origin-embedder-policy/credentialless/resources/cacheable-response.py is also merged into dispatcher.py, because they should access the same stash and already have common code. - Stash paths are moved to '/common/dispatcher'. - `executer.js` and `sw_executer.js` are moved to `executer-worker.js` and `executer-service-worker.js`, respectively, to clarify they are worker scripts, rather than helpers. - Timeout in receive() is removed because no one uses that parameter. - Duplicated/unused const declarations are removed. Bug: 1107415 Change-Id: I0d28e7f4b4cca6599562ac4766a326880139028d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3033199 Commit-Queue: Hiroshige Hayashizaki <[email protected]> Reviewed-by: Arthur Sonzogni <[email protected]> Reviewed-by: Kouhei Ueno <[email protected]> Cr-Commit-Position: refs/heads/main@{#921511} Co-authored-by: Hiroshige Hayashizaki <[email protected]> -- wpt-commits: bb06b9cd1abb9467a296177d468da156f6df2bbc wpt-pr: 29684
…amework to /common, a=testonly Automatic update from web-platform-tests [WPT] Move/merge COEP/COOP dispatcher framework to /common (#29684) To reduce duplication and prepare for using this framework for BFCache (web-platform-tests/wpt#28950), this CL merges two sets of dispatcher/executor files under COEP and COOP and move them to `/common`. Relevant discussion is also in web-platform-tests/rfcs#89. Most of the changes are simple path renaming, except for: - Service worker's scope is also moved to `/common/dispatcher/` in: /wpt/html/cross-origin-embedder-policy/credentialless/service-worker-coep-credentialless-proxy.tentative.https.html /wpt/html/cross-origin-embedder-policy/credentialless/service-worker-coep-none-proxy.tentative.https.html /wpt/html/cross-origin-opener-policy/popup-coop-by-sw.https.html because the service workers should control executors. - Diffs between COEP and COOP dispatchers are merged, but are trivial (e.g. some functionality exists only one of them, like 6 concurrent accesses to the server, retrying on failure, Access-Control-Allow-Credentials in dispatcher, etc.). - Reporting-related part of `dispatcher.js` is moved to /wpt/html/cross-origin-opener-policy/reporting/resources/reporting-common.js. - README.md about the dispatcher is moved and added. - /wpt/html/cross-origin-embedder-policy/credentialless/resources/cacheable-response.py is also merged into dispatcher.py, because they should access the same stash and already have common code. - Stash paths are moved to '/common/dispatcher'. - `executer.js` and `sw_executer.js` are moved to `executer-worker.js` and `executer-service-worker.js`, respectively, to clarify they are worker scripts, rather than helpers. - Timeout in receive() is removed because no one uses that parameter. - Duplicated/unused const declarations are removed. Bug: 1107415 Change-Id: I0d28e7f4b4cca6599562ac4766a326880139028d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3033199 Commit-Queue: Hiroshige Hayashizaki <[email protected]> Reviewed-by: Arthur Sonzogni <[email protected]> Reviewed-by: Kouhei Ueno <[email protected]> Cr-Commit-Position: refs/heads/main@{#921511} Co-authored-by: Hiroshige Hayashizaki <[email protected]> -- wpt-commits: bb06b9cd1abb9467a296177d468da156f6df2bbc wpt-pr: 29684
Thanks Hiroshige! |
…amework to /common, a=testonly Automatic update from web-platform-tests [WPT] Move/merge COEP/COOP dispatcher framework to /common (#29684) To reduce duplication and prepare for using this framework for BFCache (web-platform-tests/wpt#28950), this CL merges two sets of dispatcher/executor files under COEP and COOP and move them to `/common`. Relevant discussion is also in web-platform-tests/rfcs#89. Most of the changes are simple path renaming, except for: - Service worker's scope is also moved to `/common/dispatcher/` in: /wpt/html/cross-origin-embedder-policy/credentialless/service-worker-coep-credentialless-proxy.tentative.https.html /wpt/html/cross-origin-embedder-policy/credentialless/service-worker-coep-none-proxy.tentative.https.html /wpt/html/cross-origin-opener-policy/popup-coop-by-sw.https.html because the service workers should control executors. - Diffs between COEP and COOP dispatchers are merged, but are trivial (e.g. some functionality exists only one of them, like 6 concurrent accesses to the server, retrying on failure, Access-Control-Allow-Credentials in dispatcher, etc.). - Reporting-related part of `dispatcher.js` is moved to /wpt/html/cross-origin-opener-policy/reporting/resources/reporting-common.js. - README.md about the dispatcher is moved and added. - /wpt/html/cross-origin-embedder-policy/credentialless/resources/cacheable-response.py is also merged into dispatcher.py, because they should access the same stash and already have common code. - Stash paths are moved to '/common/dispatcher'. - `executer.js` and `sw_executer.js` are moved to `executer-worker.js` and `executer-service-worker.js`, respectively, to clarify they are worker scripts, rather than helpers. - Timeout in receive() is removed because no one uses that parameter. - Duplicated/unused const declarations are removed. Bug: 1107415 Change-Id: I0d28e7f4b4cca6599562ac4766a326880139028d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3033199 Commit-Queue: Hiroshige Hayashizaki <[email protected]> Reviewed-by: Arthur Sonzogni <[email protected]> Reviewed-by: Kouhei Ueno <[email protected]> Cr-Commit-Position: refs/heads/main@{#921511} Co-authored-by: Hiroshige Hayashizaki <[email protected]> -- wpt-commits: bb06b9cd1abb9467a296177d468da156f6df2bbc wpt-pr: 29684
…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 <[email protected]> Reviewed-by: Arthur Sonzogni <[email protected]> Commit-Queue: Hiroshige Hayashizaki <[email protected]> Cr-Commit-Position: refs/heads/main@{#927566} Co-authored-by: Hiroshige Hayashizaki <[email protected]> -- wpt-commits: 2947a57c382cd0886906a8cbb6bad702d70a7976 wpt-pr: 28950
…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 <[email protected]> Reviewed-by: Arthur Sonzogni <[email protected]> Commit-Queue: Hiroshige Hayashizaki <[email protected]> Cr-Commit-Position: refs/heads/main@{#927566} Co-authored-by: Hiroshige Hayashizaki <[email protected]> -- wpt-commits: 2947a57c382cd0886906a8cbb6bad702d70a7976 wpt-pr: 28950
…orm-tests#29684) To reduce duplication and prepare for using this framework for BFCache (web-platform-tests#28950), this CL merges two sets of dispatcher/executor files under COEP and COOP and move them to `/common`. Relevant discussion is also in web-platform-tests/rfcs#89. Most of the changes are simple path renaming, except for: - Service worker's scope is also moved to `/common/dispatcher/` in: /wpt/html/cross-origin-embedder-policy/credentialless/service-worker-coep-credentialless-proxy.tentative.https.html /wpt/html/cross-origin-embedder-policy/credentialless/service-worker-coep-none-proxy.tentative.https.html /wpt/html/cross-origin-opener-policy/popup-coop-by-sw.https.html because the service workers should control executors. - Diffs between COEP and COOP dispatchers are merged, but are trivial (e.g. some functionality exists only one of them, like 6 concurrent accesses to the server, retrying on failure, Access-Control-Allow-Credentials in dispatcher, etc.). - Reporting-related part of `dispatcher.js` is moved to /wpt/html/cross-origin-opener-policy/reporting/resources/reporting-common.js. - README.md about the dispatcher is moved and added. - /wpt/html/cross-origin-embedder-policy/credentialless/resources/cacheable-response.py is also merged into dispatcher.py, because they should access the same stash and already have common code. - Stash paths are moved to '/common/dispatcher'. - `executer.js` and `sw_executer.js` are moved to `executer-worker.js` and `executer-service-worker.js`, respectively, to clarify they are worker scripts, rather than helpers. - Timeout in receive() is removed because no one uses that parameter. - Duplicated/unused const declarations are removed. Bug: 1107415 Change-Id: I0d28e7f4b4cca6599562ac4766a326880139028d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3033199 Commit-Queue: Hiroshige Hayashizaki <[email protected]> Reviewed-by: Arthur Sonzogni <[email protected]> Reviewed-by: Kouhei Ueno <[email protected]> Cr-Commit-Position: refs/heads/main@{#921511} Co-authored-by: Hiroshige Hayashizaki <[email protected]>
…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 <[email protected]> Reviewed-by: Arthur Sonzogni <[email protected]> Commit-Queue: Hiroshige Hayashizaki <[email protected]> Cr-Commit-Position: refs/heads/main@{#927566} Co-authored-by: Hiroshige Hayashizaki <[email protected]>
To reduce duplication and prepare for using this framework for BFCache (web-platform-tests/wpt#28950), this CL merges two sets of dispatcher/executor files under COEP and COOP and move them to `/common`. Relevant discussion is also in web-platform-tests/rfcs#89. Most of the changes are simple path renaming, except for: - Service worker's scope is also moved to `/common/dispatcher/` in: /wpt/html/cross-origin-embedder-policy/credentialless/service-worker-coep-credentialless-proxy.tentative.https.html /wpt/html/cross-origin-embedder-policy/credentialless/service-worker-coep-none-proxy.tentative.https.html /wpt/html/cross-origin-opener-policy/popup-coop-by-sw.https.html because the service workers should control executors. - Diffs between COEP and COOP dispatchers are merged, but are trivial (e.g. some functionality exists only one of them, like 6 concurrent accesses to the server, retrying on failure, Access-Control-Allow-Credentials in dispatcher, etc.). - Reporting-related part of `dispatcher.js` is moved to /wpt/html/cross-origin-opener-policy/reporting/resources/reporting-common.js. - README.md about the dispatcher is moved and added. - /wpt/html/cross-origin-embedder-policy/credentialless/resources/cacheable-response.py is also merged into dispatcher.py, because they should access the same stash and already have common code. - Stash paths are moved to '/common/dispatcher'. - `executer.js` and `sw_executer.js` are moved to `executer-worker.js` and `executer-service-worker.js`, respectively, to clarify they are worker scripts, rather than helpers. - Timeout in receive() is removed because no one uses that parameter. - Duplicated/unused const declarations are removed. Bug: 1107415 Change-Id: I0d28e7f4b4cca6599562ac4766a326880139028d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3033199 Commit-Queue: Hiroshige Hayashizaki <[email protected]> Reviewed-by: Arthur Sonzogni <[email protected]> Reviewed-by: Kouhei Ueno <[email protected]> Cr-Commit-Position: refs/heads/main@{#921511} NOKEYCHECK=True GitOrigin-RevId: 15251d1ae5716c67e3b4a71665d38a7a78b36e70
…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 <[email protected]> Reviewed-by: Arthur Sonzogni <[email protected]> Commit-Queue: Hiroshige Hayashizaki <[email protected]> Cr-Commit-Position: refs/heads/main@{#927566} NOKEYCHECK=True GitOrigin-RevId: 66dbd4c686fec8d07c493c6283ab906c57752e39
This PR adds
RemoteContext.execute_script()
and its documentationin
/common/dispatcher/
.This is based on with
execute_script()
-related parts of RFCs 88/89/91:and addresses comments:
RemoteContext.execute_script()
and add basic BFCache tests + helpers #28950 (comment)plus additional clarifications around navigation,
minus
testdriver
integration (so this PR is implemented usingsend()
/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 <[email protected]>
Reviewed-by: Arthur Sonzogni <[email protected]>
Commit-Queue: Hiroshige Hayashizaki <[email protected]>
Cr-Commit-Position: refs/heads/main@{#927566}