blob: 0ab6f7cabd3498d64990c932f7a75c055bda4a0a [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../resources/js-test-pre.js"></script>
</head>
<body>
<script>
description("Tests when line breaking is allowed after a question mark character.");
var div = document.body.appendChild(document.createElement("div"));
div.style.width = "1px";
div.style.fontFamily = "ahem";
div.style.fontSize = "25px";
function allowsBreakBefore(i)
{
div.innerText = "A?" + String.fromCharCode(i);
return div.offsetHeight > 25;
}
var unallowedBreaks = [0x21, 0x22, 0x27, 0x29, 0x2c, 0x2e, 0x2f, 0x3a, 0x3b, 0x3f, 0x5d, 0x7d];
for (var i = 33; i < 128; ++i)
shouldBe("allowsBreakBefore(" + i + ")", unallowedBreaks.indexOf(i) >= 0 ? "false" : "true");
document.body.removeChild(div);
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>