Add Webdriver testing for Lifecycle API |
|||
Issue descriptionThis bug tracks adding the necessary hooks in chrome that would allow writing a webdriver extension. The purpose of this is to be able to transition between the new lifecycle states as described https://github.com/WICG/web-lifecycle Specifically we want to test the callbacks for onfreeze (i.e transition to FROZEN), onresume (FROZEN-->ACTIVE) and the wasDiscarded bit (DISCARDED->ACTIVE) as well as test any constraints applied on during their execution. Most of the work for this bug will be inside the remote debugging protocol.
,
May 31 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/a30523f53380698715eb0cb154ca03e94d4b9a0e commit a30523f53380698715eb0cb154ca03e94d4b9a0e Author: Fadi Meawad <fmeawad@chromium.org> Date: Thu May 31 19:05:27 2018 [PageLifecycle] Add WPT test for lifecycle's onfreeze callback Since the onfreeze callback is invoked based on an internal decision from the browser, to be able to test the callback, we are adding support for it from chromeGPUBenchmak as well as in chromedriver/WebDriver. This CL focuses on the chromeGPUBenchmark solution. The WPT test itself, verifies that the onfreeze callback is called, and it also verifies that only fetch keepalive is allowed from withing the callback. Bug: chromium:837709 Change-Id: Ia4cb16dc10625f478ec270617da1a26395a9d29d Reviewed-on: https://chromium-review.googlesource.com/1072899 Reviewed-by: Jonathon Kereliuk <kereliuk@chromium.org> Reviewed-by: Shubhie Panicker <panicker@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Fadi Meawad <fmeawad@chromium.org> Cr-Commit-Position: refs/heads/master@{#563338} [modify] https://crrev.com/a30523f53380698715eb0cb154ca03e94d4b9a0e/content/renderer/gpu/gpu_benchmarking_extension.cc [modify] https://crrev.com/a30523f53380698715eb0cb154ca03e94d4b9a0e/content/renderer/gpu/gpu_benchmarking_extension.h [add] https://crrev.com/a30523f53380698715eb0cb154ca03e94d4b9a0e/third_party/WebKit/LayoutTests/external/wpt/lifecycle/freeze.html [add] https://crrev.com/a30523f53380698715eb0cb154ca03e94d4b9a0e/third_party/WebKit/LayoutTests/external/wpt/lifecycle/resources/foo.txt [add] https://crrev.com/a30523f53380698715eb0cb154ca03e94d4b9a0e/third_party/WebKit/LayoutTests/external/wpt/lifecycle/resources/window.html [modify] https://crrev.com/a30523f53380698715eb0cb154ca03e94d4b9a0e/third_party/WebKit/LayoutTests/external/wpt/resources/testdriver.js [modify] https://crrev.com/a30523f53380698715eb0cb154ca03e94d4b9a0e/third_party/WebKit/LayoutTests/resources/testdriver-vendor.js [modify] https://crrev.com/a30523f53380698715eb0cb154ca03e94d4b9a0e/third_party/WebKit/LayoutTests/resources/testdriver.js
,
Jun 1 2018
Looks like freeze.html crashes with Network Service, would you be able to take a look? https://ci.chromium.org/buildbot/chromium.fyi/Mojo%20Linux/14028 STDERR: [1:1:0531/133558.285693:FATAL:frame_scheduler_impl.cc(599)] Check failed: !parent_page_scheduler_->IsPageVisible(). STDERR: #0 0x00000380a3fc base::debug::StackTrace::StackTrace() STDERR: #1 0x000003785a9b logging::LogMessage::~LogMessage() blink::scheduler::FrameSchedulerImpl::CalculateThrottlingState() STDERR: #3 0x000002ce7290 blink::FrameOrWorkerScheduler::NotifyThrottlingObservers() STDERR: #4 0x000002d0d519 blink::scheduler::PageSchedulerImpl::SetPageFrozenImpl() STDERR: #5 0x000006b4ca1f gin::internal::Dispatcher<>::DispatchToCallback() STDERR: #6 0x0000022a6753 v8::internal::FunctionCallbackArguments::Call() STDERR: #7 0x0000022a4ab2 v8::internal::(anonymous namespace)::HandleApiCallHelper<>() STDERR: #8 0x0000022a2e78 v8::internal::Builtin_Impl_HandleApiCall() STDERR: #9 0x0000022a28bd v8::internal::Builtin_HandleApiCall() STDERR: #10 0x1f4aac6b3c24 <unknown> STDERR:
,
Jun 1 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/96f4a75a42946074d71a7c84965e0bb505e4c446 commit 96f4a75a42946074d71a7c84965e0bb505e4c446 Author: Kinuko Yasuda <kinuko@chromium.org> Date: Fri Jun 01 03:35:12 2018 PageLifeCycle: lifecycle/freeze.html crashes with Network Service STDERR: [1:1:0531/133558.285693:FATAL:frame_scheduler_impl.cc(599)] Check failed: !parent_page_scheduler_->IsPageVisible(). TBR=fmeawad@chromium.org Bug: 837709, 848604 Cq-Include-Trybots: master.tryserver.chromium.linux:linux_mojo Change-Id: I6635515300bd5f9f2250584f2250d76c2510828d No-Try: true Reviewed-on: https://chromium-review.googlesource.com/1081778 Commit-Queue: Kinuko Yasuda <kinuko@chromium.org> Reviewed-by: Kinuko Yasuda <kinuko@chromium.org> Cr-Commit-Position: refs/heads/master@{#563523} [modify] https://crrev.com/96f4a75a42946074d71a7c84965e0bb505e4c446/third_party/WebKit/LayoutTests/FlagExpectations/enable-features=NetworkService
,
Jun 6 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/14bf1ca3049897e85e1dd527ef0ec51f65ea5e7c commit 14bf1ca3049897e85e1dd527ef0ec51f65ea5e7c Author: Fadi Meawad <fmeawad@chromium.org> Date: Wed Jun 06 20:54:11 2018 [PageLifecycle] Fix WPT test by hiding the page before freezing Freezing can only work on hidden pages, currently there is no easy way in webdriver that allows us to hide the page. A new webdriver API is in the works to enable that, but meanwhile, for all testing API, we have to couple hiding with freezing. This CL does that and reenables the test with Network Service. Bug: 837709, 848604 Cq-Include-Trybots: master.tryserver.chromium.linux:linux_mojo Change-Id: Ib5c513aefb219cef38a563be81fe8abf4b354051 Reviewed-on: https://chromium-review.googlesource.com/1089354 Commit-Queue: Fadi Meawad <fmeawad@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Cr-Commit-Position: refs/heads/master@{#565031} [modify] https://crrev.com/14bf1ca3049897e85e1dd527ef0ec51f65ea5e7c/content/renderer/gpu/gpu_benchmarking_extension.cc [modify] https://crrev.com/14bf1ca3049897e85e1dd527ef0ec51f65ea5e7c/third_party/WebKit/LayoutTests/FlagExpectations/enable-features=NetworkService [modify] https://crrev.com/14bf1ca3049897e85e1dd527ef0ec51f65ea5e7c/third_party/WebKit/LayoutTests/external/wpt/lifecycle/freeze.html [modify] https://crrev.com/14bf1ca3049897e85e1dd527ef0ec51f65ea5e7c/third_party/WebKit/LayoutTests/external/wpt/lifecycle/resources/window.html
,
Jun 7 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/72cc18b63aaeaed8689a902c8222b44309ef5f4a commit 72cc18b63aaeaed8689a902c8222b44309ef5f4a Author: Fadi Meawad <fmeawad@chromium.org> Date: Thu Jun 07 21:59:02 2018 [ChromeDriver][PageLifecycle] Add support for freeze/resume in ChromeDriver The CL maps the Page.setWebLifecycleState devtools protocol method to httphandler endpoints. Change-Id: I1eb66cb3e6c73b55949974fc572456c81ffaeed6 Bug: chromium:837709 Change-Id: I1eb66cb3e6c73b55949974fc572456c81ffaeed6 Reviewed-on: https://chromium-review.googlesource.com/1066395 Commit-Queue: Fadi Meawad <fmeawad@chromium.org> Reviewed-by: Jonathon Kereliuk <kereliuk@chromium.org> Cr-Commit-Position: refs/heads/master@{#565428} [modify] https://crrev.com/72cc18b63aaeaed8689a902c8222b44309ef5f4a/chrome/test/chromedriver/BUILD.gn [modify] https://crrev.com/72cc18b63aaeaed8689a902c8222b44309ef5f4a/chrome/test/chromedriver/chrome/stub_web_view.cc [modify] https://crrev.com/72cc18b63aaeaed8689a902c8222b44309ef5f4a/chrome/test/chromedriver/chrome/stub_web_view.h [modify] https://crrev.com/72cc18b63aaeaed8689a902c8222b44309ef5f4a/chrome/test/chromedriver/chrome/web_view.h [modify] https://crrev.com/72cc18b63aaeaed8689a902c8222b44309ef5f4a/chrome/test/chromedriver/chrome/web_view_impl.cc [modify] https://crrev.com/72cc18b63aaeaed8689a902c8222b44309ef5f4a/chrome/test/chromedriver/chrome/web_view_impl.h [modify] https://crrev.com/72cc18b63aaeaed8689a902c8222b44309ef5f4a/chrome/test/chromedriver/server/http_handler.cc [modify] https://crrev.com/72cc18b63aaeaed8689a902c8222b44309ef5f4a/chrome/test/chromedriver/window_commands.cc [modify] https://crrev.com/72cc18b63aaeaed8689a902c8222b44309ef5f4a/chrome/test/chromedriver/window_commands.h [add] https://crrev.com/72cc18b63aaeaed8689a902c8222b44309ef5f4a/chrome/test/chromedriver/window_commands_unittest.cc
,
Jul 13
WIP described here: https://docs.google.com/document/d/1RO153dTbCiLqUezv0v0GUdyhE3kMQt7N4cVC4eXBTtQ/edit#
,
Oct 31
|
|||
►
Sign in to add a comment |
|||
Comment 1 by bugdroid1@chromium.org
, Apr 30 2018