summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/css/first-letter-table.html
blob: 65981a6e32f88f64d9fc197120cc9ab791210d23 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<!doctype html>
<script>
  if (window.testRunner)
    testRunner.dumpAsText();

  function makeChild()
  {
    var child = document.createElement('div');
    child.textContent = 'my text content';
    return child;
  }

  function runTest()
  {
    document.querySelector('table').appendChild(makeChild());
    document.querySelector('tbody').appendChild(makeChild());
    document.querySelector('tr').appendChild(makeChild());
    document.querySelector('td').appendChild(makeChild());
  }
  onload = runTest;
</script>
<style>
  #target {
    background-color: green;
  }
  #target:first-letter, #target div:first-letter { color: red; }
</style>

<div>This test is successfully if it does not crash.</div>
<div>This test is verifying that adding content that uses first letter into
a table will work correctly.</div>

<table id="target">
 a
 <tr><td>Test</td></tr>
</table>