Index: LayoutTests/fast/forms/text-area-resize-orthogonal-containingBlock.html |
diff --git a/LayoutTests/fast/forms/text-area-resize-orthogonal-containingBlock.html b/LayoutTests/fast/forms/text-area-resize-orthogonal-containingBlock.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..c979b810212e613f5ee8ced7c455d3e6855b1ba6 |
--- /dev/null |
+++ b/LayoutTests/fast/forms/text-area-resize-orthogonal-containingBlock.html |
@@ -0,0 +1,52 @@ |
+<!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(); |
+ |
+ // The min-width/min-height includes padding and border and width/height does not include padding and border. |
+ // So when we set say min-width = 200px it means actual minimum width of box to be 194px (as 2px |
+ // paddding and 1px border on all side). |
+ // Also the containing block is orthogonal to the textarea so min-width will be 10% of height of containing block |
+ // and min-height is 10% of width of containing block |
+ if ((draggable.style.width == "64px") && (draggable.style.height == "74px")) |
+ 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()"> |
+<div id="res" style="-webkit-writing-mode: vertical-lr; width:800px; height:700px"> |
+<textarea style="width:400px; height:400px; min-width:10%; min-height:10%" id="textInputID"> |
Julien - ping for review
2014/04/29 22:13:54
Writing mode is inherited so the textarea and the
harpreet.sk
2014/04/30 10:12:53
Done.
|
+Some text |
+</textarea> |
+</div> |
+<pre id="console"></pre> |
+</body> |
+</html> |