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/fast/css/script-tests/image-set-setting.js

Issue 846933002: Handle null in value list in getLayeredShorthandValue (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix more tests Created 5 years, 11 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("Test the setting of the -webkit-image-set function."); 1 description("Test the setting of the -webkit-image-set function.");
2 2
3 function testComputedStyle(property, fullRule) 3 function testComputedStyle(property, fullRule)
4 { 4 {
5 var div = document.createElement("div"); 5 var div = document.createElement("div");
6 document.body.appendChild(div); 6 document.body.appendChild(div);
7 div.setAttribute("style", property + ": " + fullRule); 7 div.setAttribute("style", property + ": " + fullRule);
8 var computedValue = div.style.background; 8 var computedValue = div.style.backgroundImage;
9 document.body.removeChild(div); 9 document.body.removeChild(div);
10 return computedValue; 10 return computedValue;
11 } 11 }
12 12
13 function testImageSetRule(description, property, rule, expected) 13 function testImageSetRule(description, property, rule, expected)
14 { 14 {
15 debug(""); 15 debug("");
16 debug(description + " : " + rule); 16 debug(description + " : " + rule);
17 17
18 var fullRule = "-webkit-image-set(" + rule + ")"; 18 var fullRule = "-webkit-image-set(" + rule + ")";
(...skipping 17 matching lines...) Expand all
36 "url(http://www.webkit.org/c) 1x, url(http://www.webkit.org/b) 2 x, url(http://www.webkit.org/a) 1x"); 36 "url(http://www.webkit.org/c) 1x, url(http://www.webkit.org/b) 2 x, url(http://www.webkit.org/a) 1x");
37 37
38 testImageSetRule("Fractional values for background-image", 38 testImageSetRule("Fractional values for background-image",
39 "background-image", 39 "background-image",
40 "url(http://www.webkit.org/c) 0.2x, url(http://www.webkit.org/b) 2.3x, url(http://www.webkit.org/a) 12.3456x"); 40 "url(http://www.webkit.org/c) 0.2x, url(http://www.webkit.org/b) 2.3x, url(http://www.webkit.org/a) 12.3456x");
41 41
42 // FIXME: We should also be testing the behavior of negative values somewhere, b ut it's currently 42 // FIXME: We should also be testing the behavior of negative values somewhere, b ut it's currently
43 // broken. http://wkb.ug/100132 43 // broken. http://wkb.ug/100132
44 44
45 successfullyParsed = true; 45 successfullyParsed = true;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698