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

Side by Side Diff: third_party/WebKit/LayoutTests/images/color-profile-reflection.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 .reflection { 6 .reflection {
7 -webkit-box-reflect: below 5px linear-gradient(transparent, white); 7 -webkit-box-reflect: below 5px linear-gradient(transparent, white);
8 background: url("resources/red-at-12-oclock-with-color-profile.jpg"); 8 background: url("resources/red-at-12-oclock-with-color-profile.jpg");
9 height: 260px; 9 height: 260px;
10 } 10 }
11 </style> 11 </style>
12 12
13 <!-- The blue sector of the image should be at 12 o'clock and reflected below. - -> 13 <!-- The blue sector of the image should be at 12 o'clock and reflected below. - ->
14 <div></div> 14 <div></div>
15 15
16 <script> 16 <script>
17 window.onload = function() { 17 window.onload = function() {
18 if (window.testRunner) { 18 if (window.testRunner) {
19 testRunner.dumpAsTextWithPixelResults(); 19 testRunner.dumpAsTextWithPixelResults();
20 testRunner.waitUntilDone(); 20 testRunner.waitUntilDone();
21 } 21 }
22 22
23 document.querySelector('div').classList.add('reflection'); 23 document.querySelector('div').classList.add('reflection');
24 24
25 if (window.testRunner) 25 if (window.testRunner)
26 runAfterLayoutAndPaint(changeColorProfile); 26 runAfterLayoutAndPaint(done);
27 }; 27 };
28 28
29 function changeColorProfile() {
30 testRunner.setColorProfile('colorSpin', done);
31 }
32
33 function done() { 29 function done() {
34 runAfterLayoutAndPaint(function() { testRunner.notifyDone() }); 30 runAfterLayoutAndPaint(function() { testRunner.notifyDone() });
35 } 31 }
36 32
37 </script> 33 </script>
38 </html> 34 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698