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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/css/script-tests/invalid-predefined-color.js

Issue 1936913002: [CSS] Accept 8 (#RRGGBBAA) and 4 (#RGBA) value hex colors (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add quirks mode fastParseColorInternal() test cases. Created 4 years, 7 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 description( 1 description(
2 "This test checks hexadecimal color parsing." 2 "This test checks hexadecimal color parsing."
3 ); 3 );
4 4
5 var red = "rgb(255, 0, 0)"; 5 var red = "rgb(255, 0, 0)";
6 var black = "rgb(0, 0, 0)"; 6 var black = "rgb(0, 0, 0)";
7 7
8 for (var i=1;i<=5;i++) 8 for (var i=1;i<=5;i++)
9 { 9 {
10 var div = document.getElementById("valid"+i); 10 var div = document.getElementById("valid"+i);
11 shouldBe("getComputedStyle(div, null).color", "red"); 11 shouldBe("getComputedStyle(div, null).color", "red");
12 } 12 }
13 13
14 for (var i=1;i<=6;i++) 14 for (var i=1;i<=5;i++)
15 { 15 {
16 var div = document.getElementById("invalid"+i); 16 var div = document.getElementById("invalid"+i);
17 shouldBe("getComputedStyle(div, null).color", "black"); 17 shouldBe("getComputedStyle(div, null).color", "black");
18 } 18 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698