Index: third_party/WebKit/LayoutTests/scrollbars/rtl/div-absolute.html |
diff --git a/third_party/WebKit/LayoutTests/scrollbars/rtl/div-absolute.html b/third_party/WebKit/LayoutTests/scrollbars/rtl/div-absolute.html |
index 0b187db67b8e44fa1731513f80971ba5294588af..b542c2997bc6ff9e16d79eb76ae60f36d8264b42 100644 |
--- a/third_party/WebKit/LayoutTests/scrollbars/rtl/div-absolute.html |
+++ b/third_party/WebKit/LayoutTests/scrollbars/rtl/div-absolute.html |
@@ -1,8 +1,8 @@ |
<!DOCTYPE html> |
-<html> |
<head> |
Srirama
2016/08/10 13:24:39
nit: remove head here and in all the tests.
MuVen
2016/08/11 07:05:16
Done.
|
-<title>Bug 91756</title> |
-<script src="../../resources/js-test.js"></script> |
+<title>Bug 91756: Test if the widths of RTL elements are the same as the widths of the LTR elements when they include absolutely-positioned children.</title> |
+<script src="../../resources/testharness.js"></script> |
+<script src="../../resources/testharnessreport.js"></script> |
<style> |
div.outer { overflow: auto; width: 100px; position: relative; height: 100px; border: solid; } |
div.inner { position: absolute; top: 250px; } |
@@ -13,21 +13,22 @@ div.inner { position: absolute; top: 250px; } |
<div id="outerRTL" class="outer" style="direction: rtl;"><div id="innerRTL" class="inner" style="right: 200px;">foo</div> |
</div> |
<script type="text/javascript"> |
Srirama
2016/08/10 13:24:39
"type" attribute not required, remove here and in
MuVen
2016/08/11 07:05:16
Done.
|
-description('Test if the widths of RTL elements are the same as the widths of the LTR elements when they include absolutely-positioned children.'); |
+test(function(){ |
Srirama
2016/08/10 13:24:39
nit: space between () and {, in other tests as wel
MuVen
2016/08/11 07:05:16
Done.
|
+ /*Verify the widths of the outer RTL element are the same as the widths of |
Srirama
2016/08/10 13:24:39
nit: use single line comments "//", they look bett
MuVen
2016/08/11 07:05:16
Done.
|
+ the outer LTR element.*/ |
+ var outerLTR = document.getElementById('outerLTR'); |
+ var outerRTL = document.getElementById('outerRTL'); |
+ assert_equals(outerLTR.offsetWidth, outerRTL.offsetWidth); |
+ assert_equals(outerLTR.clientWidth, outerRTL.clientWidth); |
+ assert_equals(outerLTR.scrollWidth, outerRTL.scrollWidth); |
-debug('Verify the widths of the outer RTL element are the same as the widths of the outer LTR element.'); |
-var outerLTR = document.getElementById('outerLTR'); |
-var outerRTL = document.getElementById('outerRTL'); |
-shouldBeTrue('outerLTR.offsetWidth == outerRTL.offsetWidth'); |
-shouldBeTrue('outerLTR.clientWidth == outerRTL.clientWidth'); |
-shouldBeTrue('outerLTR.scrollWidth == outerRTL.scrollWidth'); |
- |
-debug('Verify the widths of the inner RTL element are the same as the widths of the inner LTR element.'); |
-var innerLTR = document.getElementById('innerLTR'); |
-var innerRTL = document.getElementById('innerRTL'); |
-shouldBeTrue('innerLTR.offsetWidth == innerRTL.offsetWidth'); |
-shouldBeTrue('innerLTR.clientWidth == innerRTL.clientWidth'); |
-shouldBeTrue('innerLTR.scrollWidth == innerRTL.scrollWidth'); |
+ /*Verify the widths of the inner RTL element are the same as the widths of |
Srirama
2016/08/10 13:24:39
ditto.
MuVen
2016/08/11 07:05:16
Done.
|
+ the inner LTR element.*/ |
+ var innerLTR = document.getElementById('innerLTR'); |
+ var innerRTL = document.getElementById('innerRTL'); |
+ assert_equals(innerLTR.offsetWidth, innerRTL.offsetWidth); |
+ assert_equals(innerLTR.clientWidth, innerRTL.clientWidth); |
+ assert_equals(innerLTR.scrollWidth, innerRTL.scrollWidth); |
+ }); |
</script> |
</body> |
-</html> |