Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(95)

Unified Diff: third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/test-helpers.js

Issue 2468863002: scheduler: Re-enable timer throttling for hidden frames (Closed)
Patch Set: Rebased Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/test-helpers.js
diff --git a/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/test-helpers.js b/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/test-helpers.js
index 0bcdcc3e348b37640b9f5dc12b62dff057348410..595ddb0012a1f27a58a656b973021ef57c383621 100644
--- a/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/test-helpers.js
+++ b/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/test-helpers.js
@@ -51,6 +51,9 @@ function with_iframe(url, options) {
return new Promise(function(resolve) {
var frame = document.createElement('iframe');
frame.src = url;
+ // Make sure the iframe stays in the viewport even if the test creates
+ // many of them. Otherwise some iframes may end up being throttled.
+ frame.style.position = 'absolute';
frame.onload = function() { resolve(frame); };
document.body.appendChild(frame);
if (typeof options === 'undefined')

Powered by Google App Engine
This is Rietveld 408576698