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

Side by Side Diff: third_party/WebKit/LayoutTests/paint/invalidation/animated-gif-offscreen.html

Issue 2321183002: Move repaint tests (except for svg/) to paint/invalidation (Closed)
Patch Set: - Created 4 years, 3 months 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
1 <!doctype HTML> 1 <!doctype HTML>
2 <body> 2 <body>
3 <div style="height: 2000px; width: 2000px;"> 3 <div style="height: 2000px; width: 2000px;">
4 <img id="targetImage"> 4 <img id="targetImage">
5 </div> 5 </div>
6 <script src="../../fast/repaint/resources/text-based-repaint.js"></script> 6 <script src="resources/text-based-repaint.js"></script>
7 <script> 7 <script>
8 window.testIsAsync = true; 8 window.testIsAsync = true;
9 9
10 // Disable under-invalidation checking because the "under-invalidation" of 10 // Disable under-invalidation checking because the "under-invalidation" of
11 // offscreen gif animation is intentional. 11 // offscreen gif animation is intentional.
12 if (window.internals) 12 if (window.internals)
13 internals.runtimeFlags.paintUnderInvalidationCheckingEnabled = false; 13 internals.runtimeFlags.paintUnderInvalidationCheckingEnabled = false;
14 14
15 function repaintTest() { 15 function repaintTest() {
16 if (window.internals) 16 if (window.internals)
17 internals.advanceImageAnimation(targetImage); 17 internals.advanceImageAnimation(targetImage);
18 requestAnimationFrame(function() { 18 requestAnimationFrame(function() {
19 finishRepaintTest(); 19 finishRepaintTest();
20 }); 20 });
21 } 21 }
22 22
23 function targetImageOnload() { 23 function targetImageOnload() {
24 // Scroll targetImage offscreen. 24 // Scroll targetImage offscreen.
25 window.scrollTo(0, 1000); 25 window.scrollTo(0, 1000);
26 runRepaintTest(); 26 runRepaintTest();
27 } 27 }
28 28
29 onload = function() { 29 onload = function() {
30 targetImage.onload = targetImageOnload; 30 targetImage.onload = targetImageOnload;
31 targetImage.src = "../../fast/backgrounds/resources/red-green-animated.gif"; 31 targetImage.src = "../../fast/backgrounds/resources/red-green-animated.gif";
32 } 32 }
33 </script> 33 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698