1 description("Test the parsing of the -webkit-image-set function.");
3 // These have to be global for the test helpers to see them.
6 function testInvalidImageSet(description, rule)
9 debug(description + " : " + rule);
11 var div = document.createElement("div");
12 div.style.backgroundImage = "-webkit-image-set(" + rule + ")";
13 document.body.appendChild(div);
15 cssRule = div.style.backgroundImage;
16 shouldBeEmptyString("cssRule");
18 document.body.removeChild(div);
21 testInvalidImageSet("Too many url parameters", "url(#a #b)");
22 testInvalidImageSet("No x", "url('#a') 1");
23 testInvalidImageSet("No comma", "url('#a') 1x url('#b') 2x");
24 testInvalidImageSet("Too many scale factor parameters", "url('#a') 1x 2x");
25 testInvalidImageSet("Scale factor is 0", "url('#a') 0x");
26 testInvalidImageSet("No url function", "'#a' 1x");
28 successfullyParsed = true;