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

Side by Side Diff: LayoutTests/fast/css/script-tests/image-set-parsing-invalid.js

Issue 714693002: Don't require getPropertyCSSValue in fast/css tests (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 1 month 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 parsing of the -webkit-image-set function."); 1 description("Test the parsing of the -webkit-image-set function.");
2 2
3 // These have to be global for the test helpers to see them. 3 // These have to be global for the test helpers to see them.
4 var cssRule; 4 var cssRule;
5 5
6 function testInvalidImageSet(description, property, rule) 6 function testInvalidImageSet(description, rule)
7 { 7 {
8 debug(""); 8 debug("");
9 debug(description + " : " + rule); 9 debug(description + " : " + rule);
10 10
11 var div = document.createElement("div"); 11 var div = document.createElement("div");
12 div.setAttribute("style", property + ": -webkit-image-set(" + rule + ")"); 12 div.style.backgroundImage = "-webkit-image-set(" + rule + ")";
13 document.body.appendChild(div); 13 document.body.appendChild(div);
14 14
15 cssRule = div.style.getPropertyCSSValue(property); 15 cssRule = div.style.backgroundImage;
16 shouldBe("cssRule", "null"); 16 shouldBeEmptyString("cssRule");
17 17
18 document.body.removeChild(div); 18 document.body.removeChild(div);
19 } 19 }
20 20
21 testInvalidImageSet("Too many url parameters", "background-image", "url(#a #b)") ; 21 testInvalidImageSet("Too many url parameters", "url(#a #b)");
22 testInvalidImageSet("No x", "background-image", "url('#a') 1"); 22 testInvalidImageSet("No x", "url('#a') 1");
23 testInvalidImageSet("No comma", "background-image", "url('#a') 1x url('#b') 2x") ; 23 testInvalidImageSet("No comma", "url('#a') 1x url('#b') 2x");
24 testInvalidImageSet("Too many scale factor parameters", "background-image", "url ('#a') 1x 2x"); 24 testInvalidImageSet("Too many scale factor parameters", "url('#a') 1x 2x");
25 testInvalidImageSet("Scale factor is 0", "background-image", "url('#a') 0x"); 25 testInvalidImageSet("Scale factor is 0", "url('#a') 0x");
26 testInvalidImageSet("No url function", "background-image", "'#a' 1x"); 26 testInvalidImageSet("No url function", "'#a' 1x");
27 27
28 successfullyParsed = true; 28 successfullyParsed = true;
OLDNEW
« no previous file with comments | « LayoutTests/fast/css/script-tests/image-set-parsing.js ('k') | LayoutTests/fast/css/sheet-collection-link.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698