blob: 5a6ba314cad4b83dd05be67db8b5e4fd06d8c628 [file] [log] [blame]
<!doctype html>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<style>
#container {
overflow: auto;
border: 1px solid black;
width: 200px;
height: 100px;
direction: rtl;
}
#target {
width: 300px;
height: 200px;
background-color: rgba(0, 255, 0, 0.3);
}
</style>
<p>Overflow test, direction:rtl.</p>
<div id="container">
<div id="target"></div>
</div>
<script>
var container = document.querySelector('#container');
var target = document.querySelector('#target');
test(function() {
assert_equals(container.scrollWidth, target.offsetWidth, "width");
assert_equals(container.scrollHeight, target.offsetHeight, "height");
}, "basic direction:rtl overflow");
test(function() {
target.style.height = "400px";
assert_equals(container.scrollWidth, target.offsetWidth, "width");
assert_equals(container.scrollHeight, target.offsetHeight, "height");
}, "basic direction:rtl, after target resize");
</script>