2006-12-07 Kirby White <KWhiteRight@gmail.com>
authorbdash <bdash@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Dec 2006 00:14:47 +0000 (00:14 +0000)
committerbdash <bdash@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Dec 2006 00:14:47 +0000 (00:14 +0000)
        Reviewed by Adele.

        http://bugs.webkit.org/show_bug.cgi?id=11771
        Bug 11771: Add a test for resetting a textarea form control

        * fast/dom/HTMLTextAreaElement/reset-textarea-expected.checksum: Added.
        * fast/dom/HTMLTextAreaElement/reset-textarea-expected.png: Added.
        * fast/dom/HTMLTextAreaElement/reset-textarea-expected.txt: Added.
        * fast/dom/HTMLTextAreaElement/reset-textarea.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@18067 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/fast/dom/HTMLTextAreaElement/reset-textarea-expected.checksum [new file with mode: 0644]
LayoutTests/fast/dom/HTMLTextAreaElement/reset-textarea-expected.png [new file with mode: 0644]
LayoutTests/fast/dom/HTMLTextAreaElement/reset-textarea-expected.txt [new file with mode: 0644]
LayoutTests/fast/dom/HTMLTextAreaElement/reset-textarea.html [new file with mode: 0644]

index 96657e957307d89c44e52ed39fc3457ebc357f1b..c6b720815576cce143945a5807478be395728361 100644 (file)
@@ -1,3 +1,15 @@
+2006-12-07  Kirby White  <KWhiteRight@gmail.com>
+
+        Reviewed by Adele.
+
+        http://bugs.webkit.org/show_bug.cgi?id=11771
+        Bug 11771: Add a test for resetting a textarea form control
+
+        * fast/dom/HTMLTextAreaElement/reset-textarea-expected.checksum: Added.
+        * fast/dom/HTMLTextAreaElement/reset-textarea-expected.png: Added.
+        * fast/dom/HTMLTextAreaElement/reset-textarea-expected.txt: Added.
+        * fast/dom/HTMLTextAreaElement/reset-textarea.html: Added.
+
 2006-12-06  Justin Garcia  <justin.garcia@apple.com>
 
         Reviewed by darin
diff --git a/LayoutTests/fast/dom/HTMLTextAreaElement/reset-textarea-expected.checksum b/LayoutTests/fast/dom/HTMLTextAreaElement/reset-textarea-expected.checksum
new file mode 100644 (file)
index 0000000..05b67a3
--- /dev/null
@@ -0,0 +1 @@
+c4da20b4e174de7d2161a0eb5dce1c8d
\ No newline at end of file
diff --git a/LayoutTests/fast/dom/HTMLTextAreaElement/reset-textarea-expected.png b/LayoutTests/fast/dom/HTMLTextAreaElement/reset-textarea-expected.png
new file mode 100644 (file)
index 0000000..6332b8d
Binary files /dev/null and b/LayoutTests/fast/dom/HTMLTextAreaElement/reset-textarea-expected.png differ
diff --git a/LayoutTests/fast/dom/HTMLTextAreaElement/reset-textarea-expected.txt b/LayoutTests/fast/dom/HTMLTextAreaElement/reset-textarea-expected.txt
new file mode 100644 (file)
index 0000000..d3bafff
--- /dev/null
@@ -0,0 +1,37 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x576
+      RenderBlock {FORM} at (0,0) size 784x39
+        RenderTextField {TEXTAREA} at (2,2) size 163x28 [bgcolor=#FFFFFF] [border: (1px solid #000000)]
+        RenderText {#text} at (167,18) size 4x18
+          text run at (167,18) width 4: " "
+        RenderTextField {TEXTAREA} at (173,2) size 163x28 [bgcolor=#FFFFFF] [border: (1px solid #000000)]
+        RenderText {#text} at (338,18) size 4x18
+          text run at (338,18) width 4: " "
+        RenderButton {INPUT} at (344,19) size 45x18 [bgcolor=#C0C0C0]
+          RenderBlock (anonymous) at (8,2) size 29x13
+            RenderText at (0,0) size 29x13
+              text run at (0,0) width 29: "Reset"
+        RenderText {#text} at (0,0) size 0x0
+      RenderBlock {P} at (0,55) size 784x72
+        RenderText {#text} at (0,0) size 358x18
+          text run at (0,0) width 358: "This test verifies that textarea controls are properly reset. "
+        RenderBR {BR} at (358,14) size 0x0
+        RenderText {#text} at (0,18) size 475x18
+          text run at (0,18) width 475: "You should see two element IDs below, and the word \"SUCCESS\" twice: "
+        RenderBR {BR} at (475,32) size 0x0
+        RenderText {#text} at (0,36) size 175x18
+          text run at (0,36) width 175: "noDefaultText: SUCCESS "
+        RenderBR {BR} at (175,50) size 0x0
+        RenderText {#text} at (0,54) size 176x18
+          text run at (0,54) width 176: "hasDefaultText: SUCCESS"
+        RenderText {#text} at (0,0) size 0x0
+        RenderText {#text} at (0,0) size 0x0
+layer at (11,11) size 161x26
+  RenderBlock {DIV} at (1,1) size 161x26
+layer at (182,11) size 161x26
+  RenderBlock {DIV} at (1,1) size 161x26
+    RenderText {#text} at (3,0) size 66x13
+      text run at (3,0) width 66: "Default Text"
diff --git a/LayoutTests/fast/dom/HTMLTextAreaElement/reset-textarea.html b/LayoutTests/fast/dom/HTMLTextAreaElement/reset-textarea.html
new file mode 100644 (file)
index 0000000..d63aa5a
--- /dev/null
@@ -0,0 +1,29 @@
+<html>
+<head>
+</head>
+<body>
+<form>
+<textarea id="noDefaultText"></textarea>
+<textarea id="hasDefaultText">Default Text</textarea>
+<input id="resetButton" type="reset">
+</form>
+<p>This test verifies that textarea controls are properly reset.
+<br>You should see two element IDs below, and the word "SUCCESS" twice:
+<script>
+function test(element)
+{
+    var result = "FAILED";
+    if (element.value == element.defaultValue)
+       result = "SUCCESS";
+    document.writeln("<br>" + element.id + ": " + result);
+}
+var noDefaultText = document.getElementById("noDefaultText");
+var hasDefaultText = document.getElementById("hasDefaultText");
+noDefaultText.value = "Not the default value.";
+hasDefaultText.value = "Not the default value.";
+document.getElementById("resetButton").click();
+test(noDefaultText);
+test(hasDefaultText);
+</script>
+</body>
+</html>