Index: LayoutTests/fast/forms/textarea-resize-below-min-intrinsic-size.html |
diff --git a/LayoutTests/fast/forms/textarea-resize-below-min-intrinsic-size.html b/LayoutTests/fast/forms/textarea-resize-below-min-intrinsic-size.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..9624634c62fdca5f7db01ef8579b7482b358869c |
--- /dev/null |
+++ b/LayoutTests/fast/forms/textarea-resize-below-min-intrinsic-size.html |
@@ -0,0 +1,45 @@ |
+<!DOCTYPE html> |
+<html> |
+<head> |
+<script> |
+function log(msg) |
+{ |
+ document.getElementById('console').appendChild(document.createTextNode(msg + '\n')); |
+} |
+ |
+function test() |
+{ |
+ if (window.testRunner) { |
+ testRunner.dumpAsText(); |
+ testDragAndMove(); |
+ } else |
+ log("This test needs window.testRunner and window.eventSender to work. To manually test it, drag the textarea above. \nFor test to pass the width and height of textarea should not go below min-width and min-height"); |
+} |
+ |
+function testDragAndMove() |
+{ |
+ var draggable = document.getElementById("textInputID"); |
+ var startX = draggable.offsetLeft + 400; |
+ var startY = draggable.offsetTop + 400; |
+ |
+ eventSender.dragMode = false; |
+ eventSender.mouseMoveTo(startX,startY); |
+ eventSender.mouseDown(); |
+ // Then drag it. |
+ eventSender.mouseMoveTo(startX - 395, startY - 395); |
+ eventSender.mouseUp(); |
+ |
+ 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
|
+ log("PASS textAreaElement width is " + draggable.style.width + " and height is " + draggable.style.height); |
+ else |
+ log("FAIL textAreaElement width is " + draggable.style.width + " and height is " + draggable.style.height); |
+} |
+</script> |
+</head> |
+<body onload="test()"> |
+<textarea style="width:400px; height:400px" id="textInputID"> |
+Some text |
+</textarea> |
+<pre id="console"></pre> |
+</body> |
+</html> |