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

Side by Side Diff: LayoutTests/fast/forms/textarea-resize-min-width-min-height.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: Created 6 years, 8 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
OLDNEW
(Empty)
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html>
4 <head>
5 <script>
6 function log(msg)
7 {
8 document.getElementById('console').appendChild(document.createTextNode(msg + '\n'));
9 }
10
11 function test()
12 {
13 if (window.testRunner) {
14 testRunner.waitUntilDone();
15 testRunner.dumpAsText();
16 testDragAndMove();
17 } else
18 log("testRunner is not available");
19 }
20
21 function testDragAndMove()
22 {
23 var draggable = document.getElementById("textInputID");
24 var startX = draggable.offsetLeft + 100;
25 var startY = draggable.offsetTop + 50;
26
27 log("TextArea initial width is " + draggable.style.width);
28 log("TextArea initial height is " + draggable.style.height);
29 log("Dragging textarea to reduce it's width and height by 30px");
30
31 eventSender.dragMode = false;
32 eventSender.mouseMoveTo(startX,startY);
33 eventSender.mouseDown();
34 // Then drag it. OK not to crash.
35 eventSender.mouseMoveTo(startX - 30, startY - 30);
36 //eventSender.mouseMoveTo(startX + 20, startY + 20);
37 eventSender.mouseUp();
38
39 log("After dragging textarea new width is " + draggable.style.width);
40 log("After dragging textarea new height is " + draggable.style.height);
41 log("You will see a PASS message below if new width is 70px and new height i s 20px");
42
43 if ((draggable.style.width == "70px") && (draggable.style.height == "20px"))
44 log("PASS");
45
46 testRunner.notifyDone();
47 }
48 </script>
49 </head>
50 <body onload="test()">
51 <textarea style="width:100px; height:50px; min-width:10px; min-height:10px" id=" textInputID">
52 Some text
53 </textarea>
54 <pre id="console"></pre>
55 </body>
56 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698