Commit 14bf1ca3 authored by Fadi Meawad's avatar Fadi Meawad Committed by Commit Bot

[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: default avatarKenneth Russell <kbr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#565031}
parent 5a1b8799
...@@ -1118,6 +1118,10 @@ void GpuBenchmarking::Freeze() { ...@@ -1118,6 +1118,10 @@ void GpuBenchmarking::Freeze() {
GpuBenchmarkingContext context; GpuBenchmarkingContext context;
if (!context.Init(true)) if (!context.Init(true))
return; return;
// TODO(fmeawad): Instead of forcing a visibility change, only allow
// freezing a page if it was already hidden.
context.web_view()->SetVisibilityState(
blink::mojom::PageVisibilityState::kHidden, false);
context.web_view()->FreezePage(); context.web_view()->FreezePage();
} }
......
...@@ -7,8 +7,6 @@ Bug(none) external/wpt/html/browsers/offline/appcache/workers/appcache-worker.ht ...@@ -7,8 +7,6 @@ Bug(none) external/wpt/html/browsers/offline/appcache/workers/appcache-worker.ht
crbug.com/829417 external/wpt/html/browsers/offline/appcache/workers/appcache-worker.https.html [ Timeout ] crbug.com/829417 external/wpt/html/browsers/offline/appcache/workers/appcache-worker.https.html [ Timeout ]
crbug.com/771118 external/wpt/service-workers/service-worker/mime-sniffing.https.html [ Failure ] crbug.com/771118 external/wpt/service-workers/service-worker/mime-sniffing.https.html [ Failure ]
Bug(837709) external/wpt/lifecycle/freeze.html [ Crash ]
# Passes on NetworkService and fails on non-NetworkService because # Passes on NetworkService and fails on non-NetworkService because
# NetworkService isn't affected by https://crbug.com/595993. # NetworkService isn't affected by https://crbug.com/595993.
Bug(none) external/wpt/service-workers/service-worker/request-end-to-end.https.html [ Pass ] Bug(none) external/wpt/service-workers/service-worker/request-end-to-end.https.html [ Pass ]
......
...@@ -6,7 +6,8 @@ ...@@ -6,7 +6,8 @@
<script> <script>
var test = async_test('Test freeze callback.'); var test = async_test('Test freeze callback.');
var childWindow = window.open('resources/window.html', 'Child Window'); window.open('resources/window.html', 'Child Window');
var total_steps = 0; var total_steps = 0;
const StepStatus = { const StepStatus = {
......
...@@ -56,7 +56,6 @@ window.document.addEventListener("freeze", () => { ...@@ -56,7 +56,6 @@ window.document.addEventListener("freeze", () => {
}); });
onload = function() { onload = function() {
window.opener.focus();
window.opener.add_step(freezingStepName); window.opener.add_step(freezingStepName);
test_driver.freeze(); test_driver.freeze();
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment