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

[WPT] Introduce RemoteContext.execute_script() and add basic BFCache tests + helpers #28950

Merged
merged 1 commit into from
Oct 6, 2021

Conversation

chromium-wpt-export-bot
Copy link
Collaborator

@chromium-wpt-export-bot chromium-wpt-export-bot commented May 10, 2021

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:

and addresses comments:

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}

Copy link
Collaborator

@wpt-pr-bot wpt-pr-bot left a 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.

@chromium-wpt-export-bot chromium-wpt-export-bot changed the title [BFCache] Basic event tests + helpers [BFCache] Add basic event tests + helpers for BFCache WPT May 24, 2021
@chromium-wpt-export-bot chromium-wpt-export-bot force-pushed the chromium-export-cl-2885636 branch 2 times, most recently from 467bf8a to dc478ba Compare May 24, 2021 23:59
@hiroshige-g
Copy link
Contributor

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):
My PR asserts PRECONDITION_FAILED if a certain page is not in BFCache unexpectedly, but by observing JavaScript behavior like pageshow events, rather than isPreviousPageInBFCache (so the implementation of isPreviousPageInBFCache is not included).
This is to unblock other WPTs that can be written in a similar fashion early, so I'm planning to land this PR and then create a bunch of WPT PRs using the testing scheme introduced in this PR, in pararell to isPreviousPageInBFCache-related things.
isPreviousPageInBFCache might be helpful to provide direct checks on BFCache states and for scenarios that don't fit within this scheme, e.g. where we can't back navigate to observe pageshow events, but I think pageshow-based detection is sufficient for the first commit for this kind of simple scenarios. Changes to switch to isPreviousPageInBFCache later will be small anyway.

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.

@foolip
Copy link
Member

foolip commented Jun 2, 2021

@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.

@foolip
Copy link
Member

foolip commented Jun 2, 2021

Just a thought without having reviewed the code yet...

the WPT test infrastructure doesn't support navigating the main test Document

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?

@smaug----
Copy link
Contributor

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).
Opening a new window should work, assuming there is some commonly supported API which can be used for communication between noopener window and the main test document. The tests seems to be relying on localStorage.
(For Gecko we've used BroadcastChannel, since the page isn't evicted from bfcache if there isn't communication in the channel while it is in bfcache)

@fergald
Copy link
Contributor

fergald commented Jun 2, 2021

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 IsPreviousPageInBfcache().

@smaug----
Copy link
Contributor

Yes you can cache new windows, if they are opened using noopener :)

@hiroshige-g
Copy link
Contributor

Is this limitation a big problem, are there ways of supporting that you've considered that seem too intrusive or too much work?

The combination of top-level cross-site navigations, isolated windows, BFCache eligibility (i.e. Windows opened by iframe and window.open() without noopener aren't eligible at least in Chromium), and efforts to prevent cross-origin communications for security/privacy reasons complicates the design like where the test logic should be placed and what communication channels can be used.

Alternatives considered for window.open() with noopener:

  • iframe and window.open() without noopener: not BFCache-eligible at least in Chromium
  • Support navigating main test Documents: not sure, but probably needs more work (updating test runners for all browsers) and more design.

Alternatives considered for localStorage:

  • Fetch API + server-side stash: A page with open fetch requests is not BFCache-eligible in Chromium, so a little more coordination is needed to ensure the fetch requests for accessing stash are closed before navigation.
  • BroadcastChannel: A page with open BroadcastChannels is not BFCache-eligible in Chromium. BroadcastChannel is not supported in Safari.

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.

@foolip
Copy link
Member

foolip commented Jun 8, 2021

I misspoke in my previous question, I wanted to ask about window.open() which is used a fair bit, not iframes. But it sounds like opening new windows also doesn't really help.

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 can see two things that might be helpful here:

  • testdriver.js APIs that make it possible for a page to know if it's BFCache-eligible and the BFCache status of other pages in history.
  • A new class of tests that drive the browser from the outside, much more like WebDriver tests. These would probably be written in Python. Such tests could open multiple browser tabs/windows/instances and shuffle information between them without requiring the stash or similar mechanism.

@hiroshige-g
Copy link
Contributor

Status:
I drafted a RFC for fetch_tests_from_prefixed_local_storage() at web-platform-tests/rfcs#86.
I got a comment about COEP's executor-based style (web-platform-tests/rfcs#86 (comment)), and I found it seems to work better (probably), especially for SW-related tests.
I'm rewriting the basic event test (this PR) and another SW-related test using the COEP style, and will upload a draft PR.

@hiroshige-g
Copy link
Contributor

OK, I switched this PR (and my other drafts) to the COEP's executor framework, and thus dropped the changes to testharness.js and /common/ and the RFC.

I also removed visibilitychange events from the test, because document.visibilityState at the time of window load event is flaky on Safari (WPT draft: #29600). I might add tests for visibilitychange events later, but anyway I'd like to land the helpers first to unblock other tests.

Ready for code review again. WDYT?

@jgraham
Copy link
Contributor

jgraham commented Sep 23, 2021

I haven't reviewed this in detail, but I'm happy with the general shape of the execute_script model; it's very like where I've landed in RFC web-platform-tests/rfcs#98 and I think it will be possible to consolidate on a single implementation in the future without too mcuh difficulty.

chromium-wpt-export-bot pushed a commit 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 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
Copy link
Member

@ArthurSonzogni ArthurSonzogni left a 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.

@hiroshige-g
Copy link
Contributor

Any more comments or suggestions?
I'd like to land this PR around the end of this week, after I wait for a while for more comments and address them if any.

chromium-wpt-export-bot pushed a commit 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
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Oct 3, 2021
…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}
@hiroshige-g
Copy link
Contributor

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.

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 <[email protected]>
Reviewed-by: Arthur Sonzogni <[email protected]>
Commit-Queue: Hiroshige Hayashizaki <[email protected]>
Cr-Commit-Position: refs/heads/main@{#927566}
jamienicol pushed a commit to jamienicol/gecko that referenced this pull request Oct 4, 2021
…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
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Oct 4, 2021
…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
@past past merged commit 2947a57 into master Oct 6, 2021
@past past deleted the chromium-export-cl-2885636 branch October 6, 2021 00:01
@past
Copy link
Member

past commented Oct 6, 2021

Thanks Hiroshige!

jamienicol pushed a commit to jamienicol/gecko that referenced this pull request Oct 6, 2021
…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
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 <[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
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 <[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
Gabisampaio pushed a commit to Gabisampaio/wpt that referenced this pull request Nov 18, 2021
…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]>
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 <[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]>
mjfroman pushed a commit to mjfroman/moz-libwebrtc-third-party that referenced this pull request Oct 14, 2022
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
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 <[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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.