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

Make testdriver work cross origin #25625

Closed
jgraham opened this issue Sep 18, 2020 · 2 comments
Closed

Make testdriver work cross origin #25625

jgraham opened this issue Sep 18, 2020 · 2 comments

Comments

@jgraham
Copy link
Contributor

jgraham commented Sep 18, 2020

testdriver currently doesn't allow interacting with browsing contexts with a different origin to the test. This is basically because it's not possible to get a reference to elements in those contexts.

For cases where we can get a window reference (i.e. not the rel=noopener case) the solution here is a simple extension of the existing system; we just need to allow invoking an action via postMessage i.e. the context that wants to run the action needs to post the action it wants to run to the top-level window and the top-level window needs to invoke the action and postMessage back to the source window once it's done. Presumably for ease of use this would be wrapped up in such a way that the user-API is promise based just like the standard testdriver API.

For the case of browsing contexts that are unable to get a handle to the test window (e.g. rel=noopener) this solution doesn't work and a larger change involving passing messages via the server will be required.

@gsnedders
Copy link
Member

#25833 did this, no?

@jgraham
Copy link
Contributor Author

jgraham commented Feb 1, 2022

Yes.

@jgraham jgraham closed this as completed Feb 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants