Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / fast / frames / frameset-dynamic-resize.html
1 <!DOCTYPE html>
2 <!--
3 This tests that we don't break dynamic frameset layouts.
4 https://code.google.com/p/chromium/issues/detail?id=266882.
5 Visually it should show a green 100x100 square.
6 -->
7 <script>
8 if (window.testRunner) {
9         testRunner.dumpAsText();
10         // FIXME: Why is waitUntilDone needed?  Shouldn't this body onload wait for the subframes?
11         testRunner.waitUntilDone();
12 }
13
14 function runTest() {
15         var iframe = document.getElementById('target');
16         iframe.offsetTop; // Make sure the iframe has already had a layout.
17         iframe.style.height = '100px'; // Dynamically resize to 100 height.
18         // Check to make sure the inner frameset noticed the resize:
19         var height = iframe.contentWindow.document.body.clientHeight;
20         if (height == 100)
21                 document.write("PASS");
22         else
23                 document.write("FAIL, height should be 100, is: " + height);
24
25     document.close();
26         if (window.testRunner)
27                 testRunner.notifyDone();
28 }
29 </script>
30 <iframe id="target" style="width: 100px; height: 1px; border: 0px" src="resources/frameset-dynamic-resize-inner1.html" onload="runTest()"></iframe>