Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / text / script-tests / line-break-after-question-mark.js
blob90e8a3079f5700eba6be6c1e734e44e22f2efdcb
1 description("Tests when line breaking is allowed after a question mark character.");
3 var div = document.body.appendChild(document.createElement("div"));
4 div.style.width = "1px";
5 div.style.fontFamily = "Ahem";
6 div.style.fontSize = "25px";
8 function allowsBreakBefore(i)
10 div.innerText = "A?" + String.fromCharCode(i);
11 return div.offsetHeight > 25;
14 var unallowedBreaks = [0x21, 0x22, 0x27, 0x29, 0x2c, 0x2e, 0x2f, 0x3a, 0x3b, 0x3f, 0x5d, 0x7d];
16 for (var i = 33; i < 128; ++i)
17 shouldBe("allowsBreakBefore(" + i + ")", unallowedBreaks.indexOf(i) >= 0 ? "false" : "true");
19 document.body.removeChild(div);