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

Unified 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 side-by-side diff with in-line comments
Download patch
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>

Powered by Google App Engine
This is Rietveld 408576698