Index: LayoutTests/fast/forms/textarea-resize-min-width-min-height.html |
diff --git a/LayoutTests/fast/forms/textarea-resize-min-width-min-height.html b/LayoutTests/fast/forms/textarea-resize-min-width-min-height.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..a874981ed946009fb9e83fe57537f607c7e7b0b5 |
--- /dev/null |
+++ b/LayoutTests/fast/forms/textarea-resize-min-width-min-height.html |
@@ -0,0 +1,64 @@ |
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" |
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
Julien - ping for review
2014/04/21 17:46:46
We prefer to use the HTML5 doctype (easier to read
harpreet.sk
2014/04/24 15:28:27
Changed to HTML5 doctype.
|
+<html> |
+<head> |
+<script> |
+function log(msg) |
+{ |
+ document.getElementById('console').appendChild(document.createTextNode(msg + '\n')); |
+} |
+ |
+function updateSize() |
Julien - ping for review
2014/04/21 17:46:46
I am not a huge fan of bundling several tests into
harpreet.sk
2014/04/24 15:28:27
This layout test is removed and 3 new layout test
|
+{ |
+ var textAreaElement = document.getElementById("textInputID"); |
+ textAreaElement.style.minWidth="10%"; |
+ textAreaElement.style.minHeight="10%"; |
+ test(); |
+} |
+ |
+function test() |
+{ |
+ if (window.testRunner) { |
+ testRunner.waitUntilDone(); |
Julien - ping for review
2014/04/21 17:46:46
You don't need to make the test asynchronous as we
harpreet.sk
2014/04/24 15:28:27
Done.
|
+ testRunner.dumpAsText(); |
+ testDragAndMove(); |
+ } else |
+ log("testRunner is not available"); |
Julien - ping for review
2014/04/21 17:46:46
That's not an helpful and actionable message. Some
harpreet.sk
2014/04/24 15:28:27
Action message is modified.
|
+} |
+ |
+function testDragAndMove() |
+{ |
+ var draggable = document.getElementById("textInputID"); |
+ var startX = draggable.offsetLeft + 400; |
+ var startY = draggable.offsetTop + 400; |
+ |
+ log("TextArea initial width is " + draggable.style.width); |
+ log("TextArea initial height is " + draggable.style.height); |
+ log("Dragging textarea to reduce it's width by 250px and height by 340px"); |
+ |
+ eventSender.dragMode = false; |
+ eventSender.mouseMoveTo(startX,startY); |
+ eventSender.mouseDown(); |
+ // Then drag it. OK not to crash. |
+ eventSender.mouseMoveTo(startX - 250, startY - 340); |
+ //eventSender.mouseMoveTo(startX + 20, startY + 20); |
+ eventSender.mouseUp(); |
+ |
+ log("After dragging textarea new width is " + draggable.style.width); |
+ log("After dragging textarea new height is " + draggable.style.height); |
+ log("You will see a PASS message below if new width is 150px and new height is 60px"); |
+ |
+ if ((draggable.style.width == "150px") && (draggable.style.height == "60px")) |
+ log("PASS"); |
+ |
+ testRunner.notifyDone(); |
+} |
+</script> |
+</head> |
+<body onload="updateSize()"> |
+<textarea style="width:400px; height:400px; min-width:200px; min-height:200px" id="textInputID"> |
+Some text |
+</textarea> |
+<pre id="console"></pre> |
+</body> |
+</html> |