Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / fast / table / dynamic-descendant-percentage-height.html
1 <script>
2     if (window.testRunner)
3         testRunner.waitUntilDone();
4 </script>
5 <p>The following two green rectangles should be identical:</p>
6 <table>
7     <tr>
8         <td style="height:100px">
9             <div style="height:100%; background-color:green; border:3px solid black">This text should have a green background.</div>
10         </td>
11     </tr>
12 </table>
13 <table>
14     <tr>
15         <td style="height:100px" id="parent"></td>
16     </tr>
17 </table>
18 <script type="text/javascript">
19     window.setTimeout(function() {
20         var child = document.createElement("div");
21         child.style.height = '100%';
22         child.style.backgroundColor = 'green';
23         child.style.border="3px solid black";
24         child.innerHTML = "This text should have a green background.";
25         document.getElementById("parent").appendChild(child);
26         
27         if (window.testRunner)
28             testRunner.notifyDone();
29     }, 1);
30 </script>