blob: 6ceeab25ba770f75dd812eaaeefd63526fffe9bd [file] [log] [blame]
<!DOCTYPE html>
<body>
<script src="../../resources/js-test-pre.js"></script>
<div id="testDiv" style="position: absolute;"></div>
<script>
description("Tests assigning a calculated value to z-index CSS property.");
var testDiv = document.getElementById("testDiv");
shouldBeEmptyString("testDiv.style['z-index']");
evalAndLog("testDiv.style['z-index'] = 'calc(-2 * 3)'");
shouldBeEqualToString("testDiv.style['z-index']", "-6");
shouldBeEqualToString("window.getComputedStyle(testDiv).getPropertyValue('z-index')", "-6");
</script>
<script src="../../resources/js-test-post.js"></script>
</body>