Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / inner-text-first-letter.html
blob1216dfcbbf66fc71af8de299a16c9f20b94d0303
1 <html>
2 <head>
3 <script src="../../resources/js-test.js"></script>
4 <style>
5 .first:first-letter {
6 font-weight: bold;
7 visibility: visible;
9 .visible {
10 visiblity: visible;
12 .invisible {
13 visibility: hidden;
15 .preLine {
16 white-space: pre-line;
18 .preWrap {
19 white-space: pre-wrap;
21 .left {
22 float: left;
24 .left:first-letter {
25 text-transform: capitalize;
27 </style>
28 </head>
29 <body>
30 <div id="tests">
31 <div id="divFirst" class="first">div</div>
32 <div id="divNormal">div</div>
33 <pre id="pFirst" class="first">pre</pre>
34 <pre id="pNormal">pre</pre>
35 <div id="collapsedSpaceFirst"><span> </span><div class="first">abc</div></div>
36 <div id="collapsedSpaceNormal"><span> </span><div>abc</div></div>
37 <div id="collapsedSpacePreFirst"><span> </span><pre class="first">abc</pre></div>
38 <div id="collapsedSpacePreNormal"><span> </span><pre>abc</pre></div>
39 <div id="preSpaceFirst"><span>test</span><pre class="first"> abc</pre></div>
40 <div id="preSpaceNormal"><span>test</span><pre> abc</pre></div>
41 <div id="divSpaceFirst"><span>test</span><div class="first"> abc</div></div>
42 <div id="divSpaceNormal"><span>test</span><div> abc</div></div>
43 <div id="preLineFirst" class="first preLine">test</div>
44 <div id="preLineNormal" class="preLine">test</div>
45 <div id="preWrapFirst" class="first preWrap">
46 test</div>
47 <div id="preWrapNormal" class="preWrap">
48 test</div>
49 <div id="collapsedSpaceDivFirst"><span>foo</span><span> </span><div class="first">abc</div></div>
50 <div id="collapsedSpaceDivNormal"><span>foo</span><span> </span><div>abc</div></div>
51 <div id="firstCollapsedDivFirst"><div class="first">abc </div><span>def</span></div>
52 <div id="firstCollapsedDivNormal"><div>abc </div><span>def</span></div>
53 <div id="collapsedSpaceCollapsedDivFirst"><span>foo</span><span> </span><div class="first"> abc</div></div>
54 <div id="collapsedSpaceCollapsedDivNormal"><span>foo</span><span> </span><div> abc</div></div>
55 <div id="collapsedSpacePunctDivFirst"><span>foo</span><span> </span><div class="first">|
56 abc</div></div>
57 <div id="collapsedSpacePunctDivNormal"><span>foo</span><span> </span><div>|
58 abc</div></div>
59 <div id="divSpanFirst" class="first"><span id="f1">1</span><span id="f2">2</span></div>
60 <div id="divSpanNormal"><span id="n1">1</span><span id="n2">2</span></div>
61 <div id="invisiblePre"><pre class="invisible">test</pre></div>
62 <div id="invisiblePreFirst"><pre class="invisible first">test</pre></div>
63 <div id="invisible">
64 <div class="invisible"><input value="an input" type="text"/> </div><pre>test</pre>
65 </div>
67 <pre>
68 Results
69 </pre>
70 <div id="floatDt"><dl><dt class=left> ab<dt class=left> cd<dt class=left> e</dl></div>
71 </div>
73 <script>
74 description("This tests a letter with :first-letter applied is present in innerText.");
75 shouldBe("document.getElementById('divFirst').innerText", "document.getElementById('divNormal').innerText");
76 shouldBe("document.getElementById('pFirst').innerText", "document.getElementById('pNormal').innerText");
77 shouldBe("document.getElementById('collapsedSpaceFirst').innerText", "document.getElementById('collapsedSpaceNormal').innerText");
78 shouldBe("document.getElementById('collapsedSpacePreFirst').innerText", "document.getElementById('collapsedSpacePreNormal').innerText");
79 shouldBe("document.getElementById('preLineFirst').innerText", "document.getElementById('preLineNormal').innerText");
80 shouldBe("document.getElementById('preWrapFirst').innerText", "document.getElementById('preWrapNormal').innerText");
81 shouldBe("document.getElementById('preSpaceFirst').innerText", "document.getElementById('preSpaceNormal').innerText");
82 shouldBe("document.getElementById('collapsedSpaceDivFirst').innerText", "document.getElementById('collapsedSpaceDivNormal').innerText");
83 shouldBe("document.getElementById('firstCollapsedDivFirst').innerText", "document.getElementById('firstCollapsedDivNormal').innerText");
84 shouldBe("document.getElementById('collapsedSpaceCollapsedDivFirst').innerText", "document.getElementById('collapsedSpaceCollapsedDivNormal').innerText");
85 shouldBe("document.getElementById('collapsedSpaceCollapsedDivFirst').innerText", "'foo\\nabc\\n'");
86 shouldBe("document.getElementById('collapsedSpacePunctDivFirst').innerText", "document.getElementById('collapsedSpacePunctDivNormal').innerText");
87 shouldBe("document.getElementById('collapsedSpacePunctDivFirst').innerText", "'foo\\n| abc\\n'");
88 shouldBe("document.getElementById('divSpanFirst').innerText", "document.getElementById('divSpanNormal').innerText");
89 shouldBe("document.getElementById('invisiblePre').innerText", "''");
90 shouldBe("document.getElementById('invisiblePreFirst').innerText", "'t\\n'");
91 shouldBe("document.getElementById('invisible').innerText", "'test\\n'");
92 shouldBe("document.getElementById('floatDt').innerText", "'Ab Cd E'");
93 document.getElementById('tests').innerHTML = "";
94 </script>
95 </body>
96 </html>