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

Side by Side Diff: third_party/WebKit/LayoutTests/scrollbars/drag-rtl-resizer.html

Issue 2234773003: convert LayoutTest/scrollbars/* js-test.js tests to testharness.js based tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed review comments 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/scrollbars/drag-rtl-resizer-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <title>Bug 9223: Test that an RTL element renders a resizer to its bottom-left c orner and dragging this resizer to the left changes its width. To test manually, dragging the resizer of the below element to left, and see this element increas es its width.</title>
3 <head> 3 <script src="../resources/testharness.js"></script>
4 <title>Bug 9223</title> 4 <script src="../resources/testharnessreport.js"></script>
5 <script src="../resources/js-test.js"></script> 5 <body dir="rtl" style="margin: 0px">
6 </head> 6 <div id="overflow" dir="rtl" style="border: 2px solid black; overflow: auto; wid th: 400px; height: 400px; resize: both;">
7 <body dir="rtl" style="margin:0px"> 7 <div style="background-color: red; height: 720px"></div>
8 <div id="overflow" dir="rtl" style="border:2px solid black; overflow:auto; width : 400px; height: 400px; resize:both;"> 8 <div style="background-color: green; height: 1600px"></div>
9 <div style="background-color:red;height:720px"></div>
10 <div style="background-color:green;height:1600px"></div>
11 </div> 9 </div>
12 <script> 10 <script>
13 description('Test that an RTL element renders a resizer to its bottom-left corne r and ' + 11 async_test(function(t) {
14 'dragging this resizer to the left changes its width. ' + 12 // This test must be async because it needs to wait for WebKit to finish
15 'To test manually, dragging the resizer of the below element to left , and ' + 13 // re-layouting elements after sending mouse events.
16 'see this element increases its width.');
17
18 // This test must be async because it needs to wait for WebKit to finish re-layo uting elements
19 // after sending mouse events.
20 jsTestIsAsync = true;
21
22 function finished()
23 {
24 shouldBeTrue('document.getElementById(\'overflow\').offsetWidth > offsetWidt h');
25 finishJSTest();
26 }
27
28 var offsetWidth = document.getElementById('overflow').offsetWidth;
29
30 if (window.eventSender) {
31 var node = document.getElementById('overflow'); 14 var node = document.getElementById('overflow');
15 var offsetWidth = node.offsetWidth;
32 var offsetLeft = node.offsetLeft + 5; 16 var offsetLeft = node.offsetLeft + 5;
33 var offsetTop = node.offsetTop + node.offsetHeight - 5; 17 var offsetTop = node.offsetTop + node.offsetHeight - 5;
34 eventSender.mouseMoveTo(offsetLeft, offsetTop); 18 eventSender.mouseMoveTo(offsetLeft, offsetTop);
35 eventSender.mouseDown(); 19 eventSender.mouseDown();
36 eventSender.mouseMoveTo(offsetLeft - 30, offsetTop); 20 eventSender.mouseMoveTo(offsetLeft - 30, offsetTop);
37 eventSender.mouseUp(); 21 eventSender.mouseUp();
38 setTimeout(finished, 0); 22 setTimeout(t.step_func_done(function() {
39 } 23 assert_greater_than(node.offsetWidth, offsetWidth);
24 }), 0);
25 });
40 </script> 26 </script>
41 </body> 27 </body>
42 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/scrollbars/drag-rtl-resizer-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698