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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/dom/raf-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/raf-throttling-frame.h tml"></iframe>
12
13 <script>
14 if (window.testRunner)
15 testRunner.dumpAsText();
16 let throttlingTest = async_test("Test requestAnimationFrame() throttling in out- of-view cross origin frames");
17
18 addEventListener('load', () => {
19 // Check how many animation frames have been served to the frame after 1
20 // second.
21 setTimeout(() => {
22 var frame = document.querySelector('#frame');
23 frame.contentWindow.postMessage(null, '*');
24 }, 1000);
25 });
26
27 addEventListener('message', (e) => {
28 let rafCount = e.data;
29 // TODO(skyostil): Chrome always runs one animation frame while the layout
30 // test harness does none. Find out where the difference is coming from.
31 assert_less_than_equal(rafCount, 1, "requestAnimationFrame() callback count")
32 throttlingTest.done();
33 });
34 </script>
OLDNEW
« no previous file with comments | « content/public/common/content_features.cc ('k') | third_party/WebKit/LayoutTests/fast/dom/resources/raf-throttling-frame.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698