OLD | NEW |
1 testText("<div>abc", "abc", "Simplest possible test"); | 1 testText("<div>abc", "abc", "Simplest possible test"); |
2 | 2 |
3 /**** white-space:normal ****/ | 3 /**** white-space:normal ****/ |
4 | 4 |
5 testText("<div> abc", "abc", "Leading whitespace removed"); | 5 testText("<div> abc", "abc", "Leading whitespace removed"); |
6 testText("<div>abc ", "abc", "Trailing whitespace removed"); | 6 testText("<div>abc ", "abc", "Trailing whitespace removed"); |
7 testText("<div>abc def", "abc def", "Internal whitespace compressed"); | 7 testText("<div>abc def", "abc def", "Internal whitespace compressed"); |
8 testText("<div>abc\ndef", "abc def", "\\n converted to space"); | 8 testText("<div>abc\ndef", "abc def", "\\n converted to space"); |
9 testText("<div>abc\rdef", "abc def", "\\r converted to space"); | 9 testText("<div>abc\rdef", "abc def", "\\r converted to space"); |
10 testText("<div>abc\tdef", "abc def", "\\t converted to space"); | 10 testText("<div>abc\tdef", "abc def", "\\t converted to space"); |
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
301 testText("<div style='height:0; overflow:hidden'>abc", "abc", "overflow:hidden i
gnored even with zero height"); | 301 testText("<div style='height:0; overflow:hidden'>abc", "abc", "overflow:hidden i
gnored even with zero height"); |
302 testText("<div style='width:0; overflow:hidden; text-overflow:ellipsis'>abc", "a
bc", "text-overflow:ellipsis ignored"); | 302 testText("<div style='width:0; overflow:hidden; text-overflow:ellipsis'>abc", "a
bc", "text-overflow:ellipsis ignored"); |
303 | 303 |
304 /**** Support on non-HTML elements ****/ | 304 /**** Support on non-HTML elements ****/ |
305 | 305 |
306 testText("<svg>abc", undefined, "innerText not supported on SVG elements"); | 306 testText("<svg>abc", undefined, "innerText not supported on SVG elements"); |
307 testText("<math>abc", undefined, "innerText not supported on MathML elements"); | 307 testText("<math>abc", undefined, "innerText not supported on MathML elements"); |
308 | 308 |
309 /**** Ruby ****/ | 309 /**** Ruby ****/ |
310 | 310 |
311 testText("<div><ruby>abc<rp>(</rp><rt>def</rt><rp>)</rp></ruby>", "abc(def)", "<
rp> rendered"); | 311 testText("<div><ruby>abc<rt>def</rt></ruby>", "abcdef", "<rt> and no <rp>"); |
312 testText("<div><rp>abc</rp>", "abc", "Lone <rp> rendered"); | 312 testText("<div><ruby>abc<rp>(</rp><rt>def</rt><rp>)</rp></ruby>", "abcdef", "<rp
>"); |
313 testText("<div><rp style='visibility:hidden'>abc</rp>", "", "visibility:hidden <
rp> not rendered"); | 313 testText("<div><rp>abc</rp>", "", "Lone <rp>"); |
314 testText("<div><rp> abc </rp>", " abc ", "Lone <rp> rendered without whitespace
trimming"); | 314 testText("<div><rp style='visibility:hidden'>abc</rp>", "", "visibility:hidden <
rp>"); |
315 testText("<div><rp style='display:block'>abc</rp>def", "abc\ndef", "display:bloc
k <rp> induces line breaks"); | 315 testText("<div><rp style='display:block'>abc</rp>def", "abc\ndef", "display:bloc
k <rp>"); |
316 testText("<div><rp style='display:block'> abc </rp>def", " abc \ndef", "display:
block <rp> induces line breaks but doesn't trim whitespace"); | 316 testText("<div><rp style='display:block'> abc </rp>def", "abc\ndef", "display:bl
ock <rp> with whitespace"); |
317 // XXX this is not desirable but the spec currently requires it. | 317 testText("<div><select class='poke-rp'></select>", "", "<rp> in a <select>"); |
318 testText("<div><select class='poke-rp'></select>", "abc", "<rp> in a replaced el
ement still renders"); | |
319 | 318 |
320 /**** Shadow DOM ****/ | 319 /**** Shadow DOM ****/ |
321 | 320 |
322 if ("createShadowRoot" in document.body) { | 321 if ("createShadowRoot" in document.body) { |
323 testText("<div class='shadow'>", "", "Shadow DOM contents ignored"); | 322 testText("<div class='shadow'>", "", "Shadow DOM contents ignored"); |
324 testText("<div><div class='shadow'>", "", "Shadow DOM contents ignored"); | 323 testText("<div><div class='shadow'>", "", "Shadow DOM contents ignored"); |
325 } | 324 } |
326 | 325 |
327 /**** Flexbox ****/ | 326 /**** Flexbox ****/ |
328 | 327 |
329 if (CSS.supports('display', 'flex')) { | 328 if (CSS.supports('display', 'flex')) { |
330 testText("<div style='display:flex'><div style='order:1'>1</div><div>2</div></
div>", | 329 testText("<div style='display:flex'><div style='order:1'>1</div><div>2</div></
div>", |
331 "1\n2", "CSS 'order' property ignored"); | 330 "1\n2", "CSS 'order' property ignored"); |
332 testText("<div style='display:flex'><span>1</span><span>2</span></div>", | 331 testText("<div style='display:flex'><span>1</span><span>2</span></div>", |
333 "1\n2", "Flex items blockified"); | 332 "1\n2", "Flex items blockified"); |
334 } | 333 } |
335 | 334 |
336 /**** Grid ****/ | 335 /**** Grid ****/ |
337 | 336 |
338 if (CSS.supports('display', 'grid')) { | 337 if (CSS.supports('display', 'grid')) { |
339 testText("<div style='display:grid'><div style='order:1'>1</div><div>2</div></
div>", | 338 testText("<div style='display:grid'><div style='order:1'>1</div><div>2</div></
div>", |
340 "1\n2", "CSS 'order' property ignored"); | 339 "1\n2", "CSS 'order' property ignored"); |
341 testText("<div style='display:grid'><span>1</span><span>2</span></div>", | 340 testText("<div style='display:grid'><span>1</span><span>2</span></div>", |
342 "1\n2", "Grid items blockified"); | 341 "1\n2", "Grid items blockified"); |
343 } | 342 } |
OLD | NEW |