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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/dom/timer-throttling-out-of-view-cross-origin-page.html

Issue 2511283002: Revert of scheduler: Re-enable timer throttling for hidden frames (Closed)
Patch Set: Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src="../../resources/testharness.js"></script>
3 <script src="../../resources/testharnessreport.js"></script>
4 <style>
5 #frame {
6 position: absolute;
7 top: -1000px;
8 }
9 </style>
10
11 <iframe id="frame" sandbox="allow-scripts" src="resources/timer-throttling-frame .html"></iframe>
12
13 <script>
14 if (window.testRunner)
15 testRunner.dumpAsText();
16 let throttlingTest = async_test("Test timer throttling in out-of-view cross orig in frames");
17
18 addEventListener('load', () => {
19 // Throttling only happens after the first layout, so start the test after
20 // that.
21 requestAnimationFrame(() => {
22 var frame = document.querySelector('#frame');
23 frame.contentWindow.postMessage(null, '*');
24 });
25 });
26
27 addEventListener('message', (e) => {
28 let timerDelay = e.data;
29 assert_greater_than(timerDelay, 900, "Timer interval")
30 throttlingTest.done();
31 });
32 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698