summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/scrollbars/rtl/div-horizontal-with-vertical-scrollbar.html
diff options
context:
space:
mode:
authorsanjoy.pal@samsung.com <sanjoy.pal@samsung.com@bbb929c8-8fbe-4397-9dbb-9b2b20218538>2013-11-05 13:56:52 +0000
committersanjoy.pal@samsung.com <sanjoy.pal@samsung.com@bbb929c8-8fbe-4397-9dbb-9b2b20218538>2013-11-05 13:56:52 +0000
commitad403a1633fdc6ca8fd0b1b7cca212f42bd84f49 (patch)
treee8cc2c1729d2bbe27d8e59a94be98a09ad2ee029 /third_party/WebKit/LayoutTests/scrollbars/rtl/div-horizontal-with-vertical-scrollbar.html
parent40b809b04af5f79d3585e83afe86b8b2b5134a5b (diff)
downloadchromium_src-ad403a1633fdc6ca8fd0b1b7cca212f42bd84f49.zip
chromium_src-ad403a1633fdc6ca8fd0b1b7cca212f42bd84f49.tar.gz
chromium_src-ad403a1633fdc6ca8fd0b1b7cca212f42bd84f49.tar.bz2
Correction to layoutOverflowRect calculation in case of direction:rtl
BUG=179332 Webkit bug https://bugs.webkit.org/show_bug.cgi?id=85856 Review URL: https://codereview.chromium.org/25373006 git-svn-id: svn://svn.chromium.org/blink/trunk@161333 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Diffstat (limited to 'third_party/WebKit/LayoutTests/scrollbars/rtl/div-horizontal-with-vertical-scrollbar.html')
-rw-r--r--third_party/WebKit/LayoutTests/scrollbars/rtl/div-horizontal-with-vertical-scrollbar.html39
1 files changed, 39 insertions, 0 deletions
diff --git a/third_party/WebKit/LayoutTests/scrollbars/rtl/div-horizontal-with-vertical-scrollbar.html b/third_party/WebKit/LayoutTests/scrollbars/rtl/div-horizontal-with-vertical-scrollbar.html
new file mode 100644
index 0000000..5c59fcb
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/scrollbars/rtl/div-horizontal-with-vertical-scrollbar.html
@@ -0,0 +1,39 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script src="../../resources/js-test.js"></script>
+</head>
+<body dir="ltr">
+<div dir="ltr" id="outer-ltr" style="width: 200px; height: 200px; overflow: auto;">
+<div id="inner-ltr" style="text-align: left; width: 195px; height: 300px;">ABC</div>
+</div>
+<div dir="rtl" id="outer-rtl" style="width: 200px; height: 200px; overflow: auto;">
+<div id="inner-rtl" style="text-align: left; width: 195px; height: 300px;">ABC</div>
+</div>
+<script type="text/javascript">
+description('Test that horizontal scrollbar should appear as the content width encroaches upon the vertical scrollbar and also test if WebKit can show the left side of the inner elements regardless of the position of its scrollbars. To test manually, open this document and verify we can see "ABC" both in the LTR element and in the RTL element.');
+
+var outerLTR = document.getElementById('outer-ltr');
+var innerLTR = document.getElementById('inner-ltr');
+var outerRTL = document.getElementById('outer-rtl');
+var innerRTL = document.getElementById('inner-rtl');
+outerLTR.scrollLeft = 0;
+outerRTL.scrollLeft = 0;
+
+debug('Verify the widths of the outer RTL elements are the same as the widths of the outer LTR elements.');
+shouldBeTrue('outerLTR.offsetWidth == outerRTL.offsetWidth');
+shouldBeTrue('outerLTR.clientWidth == outerRTL.clientWidth');
+shouldBeTrue('outerLTR.scrollWidth == outerRTL.scrollWidth');
+
+debug('Verify the widths of the inner RTL elements are the same as the widths of the inner LTR elements.');
+shouldBeTrue('innerLTR.offsetWidth == innerRTL.offsetWidth');
+shouldBeTrue('innerLTR.clientWidth == innerRTL.clientWidth');
+shouldBeTrue('innerLTR.scrollWidth == innerRTL.scrollWidth');
+
+debug('Verify the width of the vertical scrollbar of the outer RTL element is the same as the one of the outer LTR element regardless of their scrollbar positions.');
+var scrollbarWidthLTR = outerLTR.offsetWidth - outerLTR.clientWidth;
+var scrollbarWidthRTL = outerRTL.offsetWidth - outerRTL.clientWidth;
+shouldBeTrue('scrollbarWidthLTR == scrollbarWidthRTL');
+</script>
+</body>
+</html>