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

Side by Side Diff: third_party/WebKit/LayoutTests/images/color-profile-background-image-cover.html

Issue 2938543003: Remove almost all Javascript calls to setColorProfile (Closed)
Patch Set: Created 3 years, 6 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 <html> 2 <html>
3 <script src="../resources/run-after-layout-and-paint.js"></script> 3 <script src="../resources/run-after-layout-and-paint.js"></script>
4 4
5 <style> 5 <style>
6 div { 6 div {
7 background: url("resources/red-at-12-oclock-with-color-profile.jpg") no-repe at; 7 background: url("resources/red-at-12-oclock-with-color-profile.jpg") no-repe at;
8 background-size: cover; 8 background-size: cover;
9 display: inline-block; 9 display: inline-block;
10 height: 376px; 10 height: 376px;
11 width: 48%; 11 width: 48%;
12 } 12 }
13 div, img { 13 div, img {
14 margin: 5px; 14 margin: 5px;
15 } 15 }
16 </style> 16 </style>
17 17
18 <body> 18 <body>
19 <!-- The _blue_ sector of the <img> image should be at 12 o'clock. --> 19 <!-- The _blue_ sector of the <img> image should be at 12 o'clock. -->
20 <img width="48%" src="resources/red-at-12-oclock-with-color-profile.jpg"> 20 <img width="48%" src="resources/red-at-12-oclock-with-color-profile.jpg">
21 <!-- Same for the <div> background image: should be at 12 o'clock. --> 21 <!-- Same for the <div> background image: should be at 12 o'clock. -->
22 <div></div> 22 <div></div>
23 </body> 23 </body>
24 24
25 <script> 25 <script>
26 window.onload = function() { 26 window.onload = function() {
27 if (window.testRunner) 27 if (window.testRunner)
28 runAfterLayoutAndPaint(changeColorProfile); 28 runAfterLayoutAndPaint(function() { testRunner.notifyDone() });
29 }; 29 };
30 30
31 function changeColorProfile() {
32 setTimeout(function() { testRunner.setColorProfile('colorSpin', done) }, 100);
33 }
34
35 function done() {
36 setTimeout(function() { testRunner.notifyDone() }, 0);
37 }
38
39 if (window.testRunner) { 31 if (window.testRunner) {
40 testRunner.dumpAsTextWithPixelResults(); 32 testRunner.dumpAsTextWithPixelResults();
41 testRunner.waitUntilDone(); 33 testRunner.waitUntilDone();
42 } 34 }
43 </script> 35 </script>
44 </html> 36 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698