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

Side by Side Diff: third_party/WebKit/LayoutTests/images/color-profile-background-clip-text.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/ahem.js"></script> 3 <script src="../resources/ahem.js"></script>
4 <script src="../resources/run-after-layout-and-paint.js"></script> 4 <script src="../resources/run-after-layout-and-paint.js"></script>
5 5
6 <style> 6 <style>
7 p { 7 p {
8 -webkit-text-fill-color: transparent; 8 -webkit-text-fill-color: transparent;
9 background: url("resources/red-at-12-oclock-with-color-profile.jpg") -20px 1 00px; 9 background: url("resources/red-at-12-oclock-with-color-profile.jpg") -20px 1 00px;
10 -webkit-background-clip: text; 10 -webkit-background-clip: text;
11 11
12 font: 220px Ahem, sans-serif; 12 font: 220px Ahem, sans-serif;
13 position: relative; 13 position: relative;
14 top: -300px; 14 top: -300px;
15 } 15 }
16 16
17 p + p { 17 p + p {
18 top: -650px; 18 top: -650px;
19 } 19 }
20 </style> 20 </style>
21 21
22 <!-- There should be no red on this page. --> 22 <!-- There should be no red on this page. -->
23 <body style="overflow: hidden"> 23 <body style="overflow: hidden">
24 <p>ppp</p><p>ppp</p> 24 <p>ppp</p><p>ppp</p>
25 </body> 25 </body>
26 26
27 <script> 27 <script>
28 window.onload = function() { 28 window.onload = function() {
29 if (window.testRunner) 29 if (window.testRunner)
30 runAfterLayoutAndPaint(changeColorProfile); 30 runAfterLayoutAndPaint(function() { testRunner.notifyDone() });
31 }; 31 };
32 32
33 function changeColorProfile() {
34 testRunner.setColorProfile('colorSpin', done);
35 }
36
37 function done() {
38 setTimeout(function() { testRunner.notifyDone() }, 0);
39 }
40
41 if (window.testRunner) { 33 if (window.testRunner) {
42 testRunner.dumpAsTextWithPixelResults(); 34 testRunner.dumpAsTextWithPixelResults();
43 testRunner.waitUntilDone(); 35 testRunner.waitUntilDone();
44 } 36 }
45 </script> 37 </script>
46 </html> 38 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698