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

Side by Side Diff: LayoutTests/inspector/elements/styles/mixed-case-color-aware-properties.html

Issue 376803002: [DevTools] Color values should be case insensitive while suggestions should be case aware (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 5 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
(Empty)
1 <html>
2 <head>
3 <script src="../../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../../http/tests/inspector/elements-test.js"></script>
5 <script>
6
7 function test()
8 {
9 function getRandomInteger(min, max) {
10 return min + Math.floor(Math.random() * (max - min + 1));
11 }
12
13 function randomizeStringCase(str)
apavlov 2014/07/14 11:25:53 All tests must be deterministic, so this is not an
14 {
15 var charIndicesForUpperCase = [];
16 for (var i = 0; i < str.length / 2; ++i) {
17 charIndicesForUpperCase.push(getRandomInteger(0, str.length));
18 }
19 str = str.split("");
20 for(i = 0; i < charIndicesForUpperCase.length; i++){
21 if (charIndicesForUpperCase[i] < str.length)
22 str[charIndicesForUpperCase[i]] = str[charIndicesForUpperCase[i]].to UpperCase();
23 }
24 return str.join('');
25 }
26
27 var colorAwareProperties = Object.keys(WebInspector.CSSMetadata._colorAwareP roperties);
28 for (var i = 0; i < colorAwareProperties.length; ++i) {
29 if (WebInspector.CSSMetadata.isColorAwareProperty(randomizeStringCase(co lorAwareProperties[i])))
30 result = "PASS";
31 else {
32 result = "FAIL";
33 break;
34 }
35 }
36 InspectorTest.addResult("Result: " + result);
37 InspectorTest.completeTest();
38 }
39 </script>
40 </head>
41
42 <body onload="runTest()">
43 <p>
44 Tests that color related mixed-cased CSS properties are really color aware.
45 </p>
46 </body>
47 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698