blob: f3000e7d8ff8e5b167af2161c7c3ffaec3ca9b9f [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../resources/js-test-pre.js"></script>
</head>
<body>
<p id="description"></p>
<div id="console"></div>
<script>
description("Test the parsing of the -webkit-image-set function.");
// These have to be global for the test helpers to see them.
var cssRule;
function testInvalidImageSet(description, property, rule)
{
debug("");
debug(description + " : " + rule);
var div = document.createElement("div");
div.setAttribute("style", property + ": -webkit-image-set(" + rule + ")");
document.body.appendChild(div);
cssRule = div.style.getPropertyCSSValue(property);
shouldBe("cssRule", "null");
document.body.removeChild(div);
}
testInvalidImageSet("Too many url parameters", "background-image", "url(#a #b)");
testInvalidImageSet("No x", "background-image", "url('#a') 1");
testInvalidImageSet("No comma", "background-image", "url('#a') 1x url('#b') 2x");
testInvalidImageSet("Too many scale factor parameters", "background-image", "url('#a') 1x 2x");
testInvalidImageSet("Scale factor is 0", "background-image", "url('#a') 0x");
successfullyParsed = true;
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>