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 89: [testdriver] Add an execute_script function to testdriver. #89

Closed
wants to merge 1 commit into from

Conversation

jgraham
Copy link
Contributor

@jgraham jgraham commented Jul 27, 2021

This provides a direct way to execute script in another browsing context.

@jgraham jgraham changed the title [testdriver] Add an execute_script function to testdriver. RFC 89: [testdriver] Add an execute_script function to testdriver. Jul 27, 2021
@jgraham
Copy link
Contributor Author

jgraham commented Jul 28, 2021

Gecko has something like this, but instead of passing in source text you pass in a function. Maybe we could have an API like

test_driver.execute_script(callable, {args: []})

e.g.

test_driver.execute_script(async (elem_id) => {
  await new Promise(resolve => setTimeout(resolve, 0));
  return document.getElementById(elem_id).innerHTML
}, {args: ["test"]})

If the function returns a promise, we always await the promise, if it returns a value we always just return the value.

On the backend, we'd toString() the function and json-encode the args and do something like

webdriver.execute_async_script(f"""
let callback = arguments[arguments.length - 1];
let result = ({function_string}).apply(null, {json.loads(args_array)});
Promise.resolve(result).then(callback);
""")

execute_script(body, async, context)
```

`body` is a function body for the script to execute. `async` controls
Copy link
Contributor

Choose a reason for hiding this comment

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

async as an argument seems somewhat painful. Most likely, it'll always be a bare boolean constant at the call sites, which doesn't tend to be readable. Would adding a separate execute_async_script method be much more work?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agreed. I'm going to update the RFC with the proposal in #89 (comment)

This provides a direct way to execute script in another browsing context.
@jgraham jgraham force-pushed the testdriver_execute_script branch from 990094f to 7c8c5f9 Compare July 29, 2021 15:28
@jgraham
Copy link
Contributor Author

jgraham commented Jul 29, 2021

I updated this based on #89 (comment) But the more I think about it, the more worried I am that the fact that WebDriver is single-threaded and waiting on some complex script running in a remote context seems like it comes with a high risk of tests that have to be killed by the harness.

let callback = arguments[arguments.length - 1];
let rv = ({function_string}).apply(null, {json.dumps(args)});
return Promise.resolve(rv).then(callback)
``
Copy link
Member

Choose a reason for hiding this comment

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

needs to be ```

Comment on lines +73 to +77
WebDriver is single-threaded, so all the WebDriver-based actions need
to be queued. That means that waiting for a promise in a remote
context blocks all testdriver functionality that uses WebDriver, and
also blocks the harness from returning results. This implies a high
risk of timeouts.
Copy link
Member

Choose a reason for hiding this comment

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

This also implies that recursive calls will never work, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes.

execute_script(fn, args, context)
```

`body` is a js function for the script to execute. To pass it to the

Choose a reason for hiding this comment

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

References in fn are evaluated on context, while args are evaluated on the caller context, right?
e.g.

execute_script(
    (arg) => [location.href, `${location.href}`, arg],
    [location.href, `${location.href}`],
    context)

would result in [the URL of context, the URL of context, the URL of the caller of execute_script, the URL of the caller of execute_script].

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, that's right.

Copy link

Choose a reason for hiding this comment

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

what is "body" here? Should this be "fn"?

@hiroshige-g
Copy link

I tested BFCache test migration to jgraham's draft PR.

It works mostly similarly to the JavaScript-based COEP dispatcher framework, and I made a wrapper class that keeps most of the tests as-is.
Diffs/wrappers needed are uploaded at https://chromium-review.googlesource.com/c/chromium/src/+/3082215.

Functionality/implementation needed in the TestDriver version:

  • A mechanism to wait for target context to be created or to become active (i.e. navigation completion triggered by window.open, back-navigation and restoration from BFCache, etc.).
    I made WPTRunner's switch_to_window() to retry until the target is found in my draft as a temporary workaround.
  • Chromium-specific testdriver-vendor.js implementation (not implemented).
    Chromium's run_web_tests.py doesn't work with the current PR yet.
    I tested my BFCache draft tests using testing/scripts/run_wpt_tests.py that uses official wpt runner and the tools/wptrunner/wptrunner/testdriver-extra.js etc. implementation in this PR.

Differences that can handled by pure JS code changes (mainly around navigations):

  • Races between injected script evaluation and page load (e.g. inline script evaluation, window load events, pageshow events, etc.).
    • In the TestDriver version, injected scripts can be evaluated even before inline script evaluation.
  • Promises returned by execute_script should not be resolved after navigation.
    • The COEP framework can wait for a Promise created before navigation and then resolved after navigation/back-navigation from BFCache.
  • When to (and when not to) wait for script evaluation results
    • In the COEP framework, I intentionally did not send the injected script result back to the caller if the injected script initiates navigation, because sending the result back via server stash + Fetch API after triggering navigation might disable BFCache. Perhaps there are no such things in the TestDriver version?
    • I added a little more await for execute_script() results, because I encountered timeouts when I called execute_script() twice without awaiting for the first call (not investigated yet, but perhaps related to the single-threadedness of the WebDriver?).

Others:

  • Chromium's testing/scripts/run_wpt_tests.py uses headless mode but BFCache is disabled in headless mode.
  • Removing the headless flag enabled BFCache, but instead causes many more visibilitychange events, because switching tabs to find the target by WebDriver caused visibility changes.

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
@hiroshige-g
Copy link

Now I think I've figured out sufficient API specification to run BFCache tests at web-platform-tests/wpt#28950 (See /common/dispatcher/README.md).
This is basically equivalent with execute_script()-related parts of RFCs 88/89/91, plus additional clarifications around navigation (like #89 (comment)), minus testdriver integration.

If it looks good, then I'd like to land the Pure-JS-based RemoteContext.execute_script() and BFCache tests in

and continue discussions on test_driver integration, as I think we will have sufficient concensus about the API surface itself, except for whether it is integrated with test_driver, and BFCache tests based on this can be migrated between JS-based and test_driver-integrated versions of RemoteContext with minimum changes.

Does this sound good?

(underlying design doc for visibility, but most of the content is now included here and in web-platform-tests/wpt#28950)

@jgraham
Copy link
Contributor Author

jgraham commented Sep 13, 2021

I don't have any objections to that. Note that #90 (comment) has a new proposal (which I'll write up properly this week) to provide cross-context execute script using only js. I think it's basically compatible with what you're doing, so it should be easy to update your code to that model in the future if desired.

@hiroshige-g
Copy link

Yeah it looks mostly compatible (I added some comments there but they don't affect much).
I'll aim to land the PRs relatively soon while I'll continue to follow the updates to the PRs.

@hiroshige-g
Copy link

cc/ @ArthurSonzogni.

My proposal is at #89 (comment), i.e. to have consensus around RFCs 88/89/91 plus BFCache-specific clarifications except for test_driver integration and RFC 90, which is summarized in web-platform-tests/wpt#28950.

I'd like to land this part soon and after that continue discussion around test_driver integration and RFC 90 (including jgraham@'s upcoming RFC/impl updates at #90 (comment)) separately, because BFCache tests don't directly depend on these two (BFCache tests are using send()/receive() indirectly, but they are encapsulated under RemoteContext.execute_script()).

chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Sep 15, 2021
To reduce duplication and prepare for using this framework for BFCache
(#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
blueboxd pushed a commit to blueboxd/chromium-legacy that referenced this pull request Sep 15, 2021
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}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Sep 15, 2021
To reduce duplication and prepare for using this framework for BFCache
(#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}
past pushed a commit to web-platform-tests/wpt that referenced this pull request Sep 16, 2021
To reduce duplication and prepare for using this framework for BFCache
(#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]>
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'm withdrawning this in favour of #98 which has a non-WebDriver based approach to the same problem.

@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
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
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 <[email protected]>
Reviewed-by: Arthur Sonzogni <[email protected]>
Commit-Queue: Hiroshige Hayashizaki <[email protected]>
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 <[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 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 <[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]>
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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants