blob: 0a592d4ca1070b4593d7edd4fe9daa35f0572c20 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script src="../../../resources/js-test-pre.js"></script>
<!-- We intentionally do not call window.internal.settings.setTextAutosizingEnabled(true) to test the default port behavior. -->
</head>
<body>
<p id="test">The quick brown fox jumped over the lazy dog.</p>
<script>
description("Tests programmatically setting and getting -webkit-text-size-adjust.");
debug("Initial value of webkitTextSizeAdjust:");
shouldBeEmptyString('document.getElementById("test").style.webkitTextSizeAdjust');
debug("<br>webkitTextSizeAdjust = &quot;auto&quot;:");
document.getElementById("test").style.webkitTextSizeAdjust = "auto";
shouldBeEqualToString('document.getElementById("test").style.webkitTextSizeAdjust', "auto");
debug("<br>webkitTextSizeAdjust = &quot;none&quot;:");
document.getElementById("test").style.webkitTextSizeAdjust = "none";
shouldBeEqualToString('document.getElementById("test").style.webkitTextSizeAdjust', "none");
debug("<br>webkitTextSizeAdjust = &quot;200%&quot;:");
document.getElementById("test").style.webkitTextSizeAdjust = "200%";
shouldBeEqualToString('document.getElementById("test").style.webkitTextSizeAdjust', "200%");
debug("<br>webkitTextSizeAdjust = &quot;dummy&quot; (invalid value):");
document.getElementById("test").style.webkitTextSizeAdjust = "dummy";
shouldBeEqualToString('document.getElementById("test").style.webkitTextSizeAdjust', "200%");
document.body.removeChild(document.getElementById("test"));
</script>
<script src="../../../resources/js-test-post.js"></script>
</body>
</html>