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

Pagestate features #41

Merged
merged 12 commits into from
Oct 18, 2021
Merged

Pagestate features #41

merged 12 commits into from
Oct 18, 2021

Conversation

blakebyrnes
Copy link
Contributor

This PR integrates PageStateGenerator with an ability to export and then import into the client.

It also adds "resources" to the generator.

When a page state is imported, it's sent in a single command to the backend as a "Tab.assert". Tab.assert then installs dom checks into each Frame as needed, and then can request them by id. This is to reduce the bandwidth of sending across client->core and also core->browser when we generate large sets of diffs.

Also in this PR:

  • Refactored some network handling across puppet/core
  • Broke up core/lib/SessionState into core/lib/Resources and Commands
  • Capture browser "load time" of resources so we know when they overlap with dom changes
  • WaitForElement returns the matching element, waitForLoad/Location internally return the navigation that satisifies the request (this is mostly for internally tracking for now)

Bugs fixed from Timetravel enhancements:

  • Duplicated hero isolated worlds created in Timetravel (this was due to accessing contentWindow before a frame was ready). This entire strategy of seeing if content windows are ready is unnecessary when driving with devtools apis, so I turned it into a flaggable feature.
  • Chromealive command timeline was misaligned with MirrorPage timeline

@calebjclark calebjclark merged commit f393879 into main Oct 18, 2021
@calebjclark calebjclark deleted the pagestate branch October 18, 2021 17:14
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.

2 participants