blob: 559023c8a43ffd4c0b108bf272d78d1fb5dd57c4 [file] [log] [blame]
<!DOCTYPE html>
<html>
<style>
* { font-size: 16px; }
div { font-size: 8px; }
</style>
<body>
<svg><image id="image"></image></svg>
<script src="../../resources/js-test-pre.js"></script>
<script>
description('Test that an SVG image accepts all buffered rendering values');
var image = document.getElementById('image');
function computedStyle(property, value) {
image.style.setProperty(property, value);
return getComputedStyle(image).getPropertyValue(property);
}
function test(property, value, expected) {
if (expected === null)
shouldBeNull('computedStyle("' + property + '", "' + value + '")');
else
shouldBeEqualToString('computedStyle("' + property + '", "' + value + '")', expected);
}
test("buffered-rendering", "", "auto");
test("buffered-rendering", "auto", "auto");
test("buffered-rendering", "dynamic", "dynamic");
test("buffered-rendering", "static", "static");
// negative tests
test("buffered-rendering", "0", "static");
test("buffered-rendering", "1", "static");
test("buffered-rendering", "true", "static");
// make sure valid values still work
test("buffered-rendering", "dynamic", "dynamic");
// more negative tests
test("buffered-rendering", "0", "dynamic");
test("buffered-rendering", "1", "dynamic");
test("buffered-rendering", "true", "dynamic");
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>