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

Side by Side Diff: LayoutTests/inspector/elements/styles/styles-invalid-color-values.html

Issue 756913002: DevTools: Rename WI.Color's toString(format) -> asString(format) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix tests Created 6 years 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 | Annotate | Revision Log
« no previous file with comments | « LayoutTests/inspector/color.html ('k') | Source/devtools/front_end/common/Color.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <script src="../../../http/tests/inspector/inspector-test.js"></script> 3 <script src="../../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../../http/tests/inspector/elements-test.js"></script> 4 <script src="../../../http/tests/inspector/elements-test.js"></script>
5 <script> 5 <script>
6 function test() 6 function test()
7 { 7 {
8 var colors = [ 8 var colors = [
9 // Each of these is red. Some may need to be clipped to [0, 255]. 9 // Each of these is red. Some may need to be clipped to [0, 255].
10 'red', 10 'red',
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 continue; 69 continue;
70 // Advanced colors do not have HEX representations. 70 // Advanced colors do not have HEX representations.
71 if (color.hasAlpha() && (colorFormat === cf.ShortHEX || colorFormat === cf.HEX)) 71 if (color.hasAlpha() && (colorFormat === cf.ShortHEX || colorFormat === cf.HEX))
72 continue; 72 continue;
73 // If there is no ShortHEX then skip it. 73 // If there is no ShortHEX then skip it.
74 if (colorFormat === cf.ShortHEX && !color.canBeShortHex()) 74 if (colorFormat === cf.ShortHEX && !color.canBeShortHex())
75 continue; 75 continue;
76 // If there is no nickname, then skip it. 76 // If there is no nickname, then skip it.
77 if (colorFormat === cf.Nickname && !color.nickname()) 77 if (colorFormat === cf.Nickname && !color.nickname())
78 continue; 78 continue;
79 InspectorTest.addResult(' ' + colorFormat + ": " + color.toString(c olorFormat)); 79 InspectorTest.addResult(' ' + colorFormat + ": " + color.asString(c olorFormat));
80 } 80 }
81 } 81 }
82 } 82 }
83 </script> 83 </script>
84 </head> 84 </head>
85 85
86 <body onload="runTest()"> 86 <body onload="runTest()">
87 <p> 87 <p>
88 Tests that the displayed string for colors correctly handles clipped CSS values and RGB percentages. 88 Tests that the displayed string for colors correctly handles clipped CSS values and RGB percentages.
89 </p> 89 </p>
90 90
91 </body> 91 </body>
92 </html> 92 </html>
OLDNEW
« no previous file with comments | « LayoutTests/inspector/color.html ('k') | Source/devtools/front_end/common/Color.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698