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

Side by Side Diff: LayoutTests/fast/forms/text-area-resize-orthogonal-containingBlock.html

Issue 239983004: Textarea resize-able only to larger; min-height and min-width properly set (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase and added shouldBeEqualToString() instead of shouldBe() in LayoutTest Created 6 years, 7 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 | LayoutTests/fast/forms/text-area-resize-orthogonal-containingBlock-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
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../../resources/js-test.js"></script>
5 </head>
6 <body>
7 <pre id="console"></pre>
8 <div id="res" style="-webkit-writing-mode: vertical-lr; width:800px; height:700p x">
9 <textarea style="-webkit-writing-mode: horizontal-tb; width:400px; height:400px; min-width:10%; min-height:10%" id="textInputID">
10 Some text
11 </textarea>
12 </div>
13 <script>
14 description("<b>Test for resizing the Textarea below it's initial size and with orthogonal containing block.</b>");
15 test();
16
17 function log(msg)
18 {
19 document.getElementById('console').appendChild(document.createTextNode(msg + '\n'));
20 }
21
22 function test()
23 {
24 if (window.testRunner)
25 testDragAndMove();
26 else
27 log("\n\nThis test needs window.testRunner and window.eventSender to wor k. To manually test it, drag the textarea below. \nFor test to pass the width an d height of textarea should not go below min-width and min-height\n\n");
28 }
29
30 function testDragAndMove()
31 {
32 var startX = document.getElementById("textInputID").offsetLeft + 400;
33 var startY = document.getElementById("textInputID").offsetTop + 400;
34
35 eventSender.dragMode = false;
36 eventSender.mouseMoveTo(startX,startY);
37 eventSender.mouseDown();
38 // Then drag it.
39 eventSender.mouseMoveTo(startX - 395, startY - 395);
40 eventSender.mouseUp();
41
42 // The min-width/min-height includes padding and border and width/height doe s not include padding and border.
43 // So when we set say min-width = 200px it means actual minimum width of box to be 194px (as 2px
44 // paddding and 1px border on all side).
45 // Also the containing block is orthogonal to the textarea so min-width will be 10% of height of containing block
46 // and min-height is 10% of width of containing block.
47 shouldBeEqualToString('document.getElementById("textInputID").style.width', '64px');
48 shouldBeEqualToString('document.getElementById("textInputID").style.height;' , '74px');
49 }
50 </script>
51 </body>
52 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/forms/text-area-resize-orthogonal-containingBlock-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698