tizen beta release
[framework/web/webkit-efl.git] / LayoutTests / fast / overflow / scrollbar-restored-and-then-locked.html
1 <body>
2     <p>
3         Test for <i><a href="https://bugs.webkit.org/show_bug.cgi?id=29431">bug 29431</a>
4         [Qt] REGRESSION:(r50665) QWebFrame::setScrollBarPolicy(Qt::Vertical,Qt::ScrollBarAlwaysOff) has no effect.
5     </p>
6     <p> This test ensures the correctness of two scrollbar behaviour:</p>
7     <ul>
8         <li> This tests that after setting 'overflow' on the document element to
9             'hidden' and back to 'visible', scrollbars appear as necessary.
10         </li>
11         <li>
12             After explicitly setting a scrollbar policy different than 'auto', WebCore
13             honors that until it is unset.
14         </li>
15     </ul>
16     <div id="dynamic"></div>
17     <p id="result">FAIL: Test did not run to completion</p>
18     <script>
19         if (window.layoutTestController)
20             layoutTestController.dumpAsText();
21
22         document.documentElement.style.overflow = "hidden";
23         document.body.offsetTop;
24         document.documentElement.style.removeProperty("overflow");
25         document.body.style.height = "200%";
26         var result = (innerWidth === document.documentElement.offsetWidth)
27             ? "FAIL: Scrollbar did not appear after resetting 'overflow'"
28             : "PASS";
29
30         if (window.layoutTestController) {
31             layoutTestController.setScrollbarPolicy('vertical', 'off');
32             layoutTestController.setScrollbarPolicy('horizontal', 'off');
33
34             result += (innerWidth === document.documentElement.offsetWidth)
35                 ? "\nPASS"
36                 : "\nFAIL: Scrollbar did appear after turning it off";
37         }
38
39         document.getElementById("result").innerText = result;
40     </script>
41 </body>