Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / fast / css / relative-positioned-block-with-inline-parent-dynamic.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3 <!--     This tests that toggling an inline's position to relative updates the position of any child blocks. -->
4     <head>
5         <title>CSS Test: Block boxes within inline boxes are affected by positioning</title>
6         <style type="text/css">
7             body { overflow: hidden; }
8             #span1
9             {
10                 background: yellow;
11                 height: 2in;
12                 display: inline;
13                 width: 2in;
14                 left: 2in;
15                 top: 2in;
16             }
17             #span2
18             {
19                 background: blue;
20                 display: inline;
21                 width: 2in;
22                 left: 2in;
23                 top: 2in;
24             }
25             #div3
26             {
27                 background: orange;
28                 width: 2in;
29             }
30         </style>
31         <script type="text/javascript">
32             if (window.testRunner) {
33                 testRunner.waitUntilDone();
34             }
35
36             function run() {
37                 document.getElementById("span2").style.position = "relative";
38                 document.body.offsetTop;
39                 if (window.testRunner)
40                     testRunner.notifyDone();
41            }
42         </script>
43     </head>
44     <body onload="setTimeout('run()', 10);">
45         <p>Test passes if the orange box sits atop the blue box and both are in the center of the view.</p>
46             <span id="span2">
47                 <i>
48                 <div id="div3">Filler Text</div>
49                 Filler Text
50                 </i>
51             </span>
52     </body>
53 </html>