Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(348)

Side by Side Diff: LayoutTests/fast/text/script-tests/line-break-after-question-mark.js

Issue 316933003: Deflake fast/text/decorations-transformed.html on Win7 (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « LayoutTests/fast/text/decorations-transformed.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 description("Tests when line breaking is allowed after a question mark character ."); 1 description("Tests when line breaking is allowed after a question mark character .");
2 2
3 var div = document.body.appendChild(document.createElement("div")); 3 var div = document.body.appendChild(document.createElement("div"));
4 div.style.width = "1px"; 4 div.style.width = "1px";
5 div.style.fontFamily = "ahem"; 5 div.style.fontFamily = "Ahem";
6 div.style.fontSize = "25px"; 6 div.style.fontSize = "25px";
7 7
8 function allowsBreakBefore(i) 8 function allowsBreakBefore(i)
9 { 9 {
10 div.innerText = "A?" + String.fromCharCode(i); 10 div.innerText = "A?" + String.fromCharCode(i);
11 return div.offsetHeight > 25; 11 return div.offsetHeight > 25;
12 } 12 }
13 13
14 var unallowedBreaks = [0x21, 0x22, 0x27, 0x29, 0x2c, 0x2e, 0x2f, 0x3a, 0x3b, 0x3 f, 0x5d, 0x7d]; 14 var unallowedBreaks = [0x21, 0x22, 0x27, 0x29, 0x2c, 0x2e, 0x2f, 0x3a, 0x3b, 0x3 f, 0x5d, 0x7d];
15 15
16 for (var i = 33; i < 128; ++i) 16 for (var i = 33; i < 128; ++i)
17 shouldBe("allowsBreakBefore(" + i + ")", unallowedBreaks.indexOf(i) >= 0 ? " false" : "true"); 17 shouldBe("allowsBreakBefore(" + i + ")", unallowedBreaks.indexOf(i) >= 0 ? " false" : "true");
18 18
19 document.body.removeChild(div); 19 document.body.removeChild(div);
OLDNEW
« no previous file with comments | « LayoutTests/fast/text/decorations-transformed.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698