WICG / page-lifecycle

Lifecycle API to support system initiated discarding and freezing
https://wicg.github.io/page-lifecycle/
Other
154 stars 12 forks source link

Add web-platform-tests for onfreeze, onresume and wasDiscarded #19

Open fmeawad opened 6 years ago

fmeawad commented 6 years ago

Currently, webdriver does not allow us to freeze/resume a page. To add those tests, we need to add webdriver support first.

The plan is as follows:

  1. Expose the internal blink code you need to the DevTools protocol (Done)
  2. Write the extension spec, broadcast to other browser vendors and vouch for interop
  3. Write the ChromeDriver implementation (WIP CL)
  4. Write the testdriver API
  5. Add WPT tests.
foolip commented 6 years ago

Hey @fmeawad, I came here from Intent to Ship: Page Lifecycle - to enable system initiated Discarding & Freezing. @kereliuk tells me you've been working with him to define a WebDriver extension and testdriver.js implementation, do you have links to those ongoing efforts?

foolip commented 6 years ago

Typo: web-page-tests → web-platform-tests :)

kereliuk commented 6 years ago

Here is a link to a CL for LayoutTests and testdriver-vendor.

fmeawad commented 6 years ago

@foolip: I fixed the issue title. I have 2 CLs in the works: The first CL that adds the wpt test, and adds support for it using chromeGPUBenchmarking, that would fail on wpt.fyi but would succeed as part of the chromium build tree. The second CL adds support in ChromeDriver for it, so that we can eventually enable it on wpt.fyi as well once all the pieces are in place.

foolip commented 6 years ago

That's really cool! I suppose that the WebDriver extension bit in the spec would also be straightforward? With all those bits in place, this would be the first end-to-end addition of an automation API for a new feature, which is very exciting!

spanicker commented 6 years ago

This is blocked on: https://github.com/web-platform-tests/wpt/pull/12380 Otherwise we have a patch ready to submit once that is in.

foolip commented 6 years ago

https://github.com/web-platform-tests/wpt/pull/12380 has been landed now. It's not the default way that Chrome is run yet, @gsnedders is working on that, but your patch against it should be possible to submit.

domenic commented 5 years ago

@spanicker @dtapuska is someone able to port the tests over? Maybe they already have and this issue can be closed?

dtapuska commented 5 years ago

From the looks of it freeze.html on wpt.fyi is still not passing. It passes in Chrome's wpt test harness but not in wpt.fyi

@gsnedders is there something still to land?

gsnedders commented 5 years ago

https://github.com/web-platform-tests/wpt/pull/16396 I think?