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

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

Issue 1972273002: Let repaint tests test pixels by default (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 <div id="targetImage" style="width: 50px; height: 50px"> 4 <div id="targetImage" style="width: 50px; height: 50px">
5 </div> 5 </div>
6 <img id="testTarget" style="visibility: hidden"> 6 <img id="testTarget" style="visibility: hidden">
7 <script src="../../fast/repaint/resources/text-based-repaint.js"></script> 7 <script src="../../fast/repaint/resources/repaint.js"></script>
8 <script> 8 <script>
9 window.testIsAsync = true; 9 window.testIsAsync = true;
10 10
11 function repaintTest() { 11 function repaintTest() {
12 window.internals.advanceImageAnimation(testTarget); 12 window.internals.advanceImageAnimation(testTarget);
13 requestAnimationFrame(function() { 13 requestAnimationFrame(function() {
14 finishRepaintTest(); 14 finishRepaintTest();
15 }); 15 });
16 } 16 }
17 17
18 function targetImageOnload() { 18 function targetImageOnload() {
19 window.internals.startTrackingRepaints(document); 19 window.internals.startTrackingRepaints(document);
20 runRepaintTest(); 20 runRepaintTest();
21 } 21 }
22 22
23 onload = function() { 23 onload = function() {
24 targetImage.style.background = "url(../../fast/backgrounds/resources/red-gre en-animated.gif)"; 24 targetImage.style.background = "url(../../fast/backgrounds/resources/red-gre en-animated.gif)";
25 25
26 // Use a parallel image element has a hack to detect whether the image has l oaded, and therefore 26 // Use a parallel image element has a hack to detect whether the image has l oaded, and therefore
27 // we'll get a frame. 27 // we'll get a frame.
28 testTarget.onload = targetImageOnload; 28 testTarget.onload = targetImageOnload;
29 testTarget.src = "../../fast/backgrounds/resources/red-green-animated.gif"; 29 testTarget.src = "../../fast/backgrounds/resources/red-green-animated.gif";
30 } 30 }
31 </script> 31 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698