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

Side by Side Diff: LayoutTests/fast/forms/textarea-resize-below-min-intrinsic-size.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: Addresses the changes asked in patch set 2 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>
2 <html>
3 <head>
4 <script>
5 function log(msg)
6 {
7 document.getElementById('console').appendChild(document.createTextNode(msg + '\n'));
8 }
9
10 function test()
11 {
12 if (window.testRunner) {
13 testRunner.dumpAsText();
14 testDragAndMove();
15 } else
16 log("This test needs window.testRunner and window.eventSender to work. T o manually test it, drag the textarea above. \nFor test to pass the width and he ight of textarea should not go below min-width and min-height");
17 }
18
19 function testDragAndMove()
20 {
21 var draggable = document.getElementById("textInputID");
22 var startX = draggable.offsetLeft + 400;
23 var startY = draggable.offsetTop + 400;
24
25 eventSender.dragMode = false;
26 eventSender.mouseMoveTo(startX,startY);
27 eventSender.mouseDown();
28 // Then drag it.
29 eventSender.mouseMoveTo(startX - 395, startY - 395);
30 eventSender.mouseUp();
31
32 if ((draggable.style.width == "9px") && (draggable.style.height == "9px"))
harpreet.sk 2014/04/24 15:28:27 The condition check here for 9px and not 15px as m
33 log("PASS textAreaElement width is " + draggable.style.width + " and hei ght is " + draggable.style.height);
34 else
35 log("FAIL textAreaElement width is " + draggable.style.width + " and hei ght is " + draggable.style.height);
36 }
37 </script>
38 </head>
39 <body onload="test()">
40 <textarea style="width:400px; height:400px" id="textInputID">
41 Some text
42 </textarea>
43 <pre id="console"></pre>
44 </body>
45 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698