| <!DOCTYPE HTML> |
| <html> |
| <head> |
| <link rel="stylesheet" href="../js/resources/js-test-style.css"> |
| <script src="../js/resources/js-test-pre.js"></script> |
| </head> |
| <body> |
| <p id="description">This tests the parsing and retrieval of the overflow, overflow-x and overflow-y properties.</p> |
| <div id="console"></div> |
| |
| <div id="tests_container"> |
| |
| <div id="test0" style="overflow: auto"></div> |
| <div id="test1" style="overflow: auto auto"></div> |
| <div id="test2" style="overflow-x: scroll; overflow-y: scroll"></div> |
| <div id="test3" style="overflow-x: overlay; overflow-y: hidden"></div> |
| <div id="test4" style="overflow-x: auto"></div> |
| <div id="test5" style="overflow-y: auto"></div> |
| <div id="test6" style="overflow: invalid"></div> |
| <div id="test7"></div> |
| |
| </div> |
| |
| <script> |
| var test0 = document.getElementById("test0"); |
| var test1 = document.getElementById("test1"); |
| var test2 = document.getElementById("test2"); |
| var test3 = document.getElementById("test3"); |
| var test4 = document.getElementById("test4"); |
| var test5 = document.getElementById("test5"); |
| var test6 = document.getElementById("test6"); |
| var test7 = document.getElementById("test6"); |
| |
| shouldBeEqualToString("test0.style.overflow", "auto"); |
| shouldBeEqualToString("test0.style.overflowX", "auto"); |
| shouldBeEqualToString("test0.style.overflowY", "auto"); |
| shouldBeEqualToString("test0.style.getPropertyShorthand('overflow-x')", "overflow"); |
| shouldBeEqualToString("test0.style.getPropertyShorthand('overflow-y')", "overflow"); |
| shouldBeEqualToString("test1.style.overflow", ""); |
| shouldBeEqualToString("test1.style.overflowX", ""); |
| shouldBeEqualToString("test1.style.overflowY", ""); |
| shouldBeEqualToString("test2.style.overflow", "scroll"); |
| shouldBeEqualToString("test2.style.overflowX", "scroll"); |
| shouldBeEqualToString("test2.style.overflowY", "scroll"); |
| shouldBeEqualToString("test3.style.overflow", ""); |
| shouldBeEqualToString("test3.style.overflowX", "overlay"); |
| shouldBeEqualToString("test3.style.overflowY", "hidden"); |
| shouldBeEqualToString("test4.style.overflow", ""); |
| shouldBeEqualToString("test4.style.overflowX", "auto"); |
| shouldBeEqualToString("test4.style.overflowY", ""); |
| shouldBeEqualToString("test5.style.overflow", ""); |
| shouldBeEqualToString("test5.style.overflowX", ""); |
| shouldBeEqualToString("test5.style.overflowY", "auto"); |
| shouldBeEqualToString("test6.style.overflow", ""); |
| shouldBeEqualToString("test6.style.overflowX", ""); |
| shouldBeEqualToString("test6.style.overflowY", ""); |
| shouldBeEqualToString("test7.style.overflow", ""); |
| shouldBeEqualToString("test7.style.overflowX", ""); |
| shouldBeEqualToString("test7.style.overflowY", ""); |
| |
| // clean up after ourselves |
| var tests_container = document.getElementById("tests_container"); |
| tests_container.parentNode.removeChild(tests_container); |
| |
| var successfullyParsed = true; |
| </script> |
| <script src="../js/resources/js-test-post.js"></script> |
| </body> |
| </html> |