| OLD | NEW |
| 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 Loading... |
| 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> |
| OLD | NEW |