Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(108)

Unified Diff: third_party/WebKit/LayoutTests/scrollbars/rtl/div-absolute.html

Issue 2229393002: convert LayoutTest/scrollbars/rtl/* js-test.js tests to testharness.js based tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: removed div-absolute-expected in virtual folder Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/scrollbars/rtl/div-absolute-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..6d9dba932b33e6a494a959c4aface674478cde07 100644
--- a/third_party/WebKit/LayoutTests/scrollbars/rtl/div-absolute.html
+++ b/third_party/WebKit/LayoutTests/scrollbars/rtl/div-absolute.html
@@ -1,33 +1,30 @@
<!DOCTYPE html>
-<html>
-<head>
-<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; }
</style>
-</head>
<body>
<div id="outerLTR" class="outer"><div id="innerLTR" class="inner" style="left: 200px;">foo</div></div>
<div id="outerRTL" class="outer" style="direction: rtl;"><div id="innerRTL" class="inner" style="right: 200px;">foo</div>
</div>
-<script type="text/javascript">
-description('Test if the widths of RTL elements are the same as the widths of the LTR elements when they include absolutely-positioned children.');
+<script>
+test(function() {
+ // 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");
+ 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 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>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/scrollbars/rtl/div-absolute-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698