blob: ee17557e639b5eb1dae07e7ca8fe0aa3fff04b05 [file] [log] [blame]
<html>
<head>
<script src="../../resources/js-test-pre.js"></script>
</head>
<body>
<p id="description"></p>
<script>
description("Test the parsing of touch-action.");
var cssRule, declaration;
var styleElement = document.createElement("style");
document.head.appendChild(styleElement);
let stylesheet = styleElement.sheet;
stylesheet.insertRule("body { touch-action: manipulation; }", 0);
cssRule = stylesheet.cssRules.item(0);
shouldBe("cssRule.type", "1");
declaration = cssRule.style;
shouldBe("declaration.length", "1");
shouldBe("declaration.getPropertyValue('touch-action')", "'manipulation'");
stylesheet.insertRule("body { touch-action: auto; }", 0);
cssRule = stylesheet.cssRules.item(0);
shouldBe("cssRule.type", "1");
declaration = cssRule.style;
shouldBe("declaration.length", "1");
shouldBe("declaration.getPropertyValue('touch-action')", "'auto'");
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>