Title: [98886] trunk/LayoutTests
Revision
98886
Author
[email protected]
Date
2011-10-31 15:07:03 -0700 (Mon, 31 Oct 2011)

Log Message

The test input-paste-undo.html needs update to work properly
https://bugs.webkit.org/show_bug.cgi?id=71091

Reviewed by David Kilzer.

Update the test to select the text that needs to be copied
so that it effectively go in the pasteboard on execCommand.

The test now dumps result as text, testing if the height does not
change with the form edition.

* fast/forms/input-paste-undo-expected.txt: Added.
* fast/forms/input-paste-undo.html:
* platform/chromium-linux/fast/forms/input-paste-undo-expected.png: Removed.
* platform/chromium-mac-leopard/fast/forms/input-paste-undo-expected.png: Removed.
* platform/chromium-mac/fast/forms/input-paste-undo-expected.png: Removed.
* platform/chromium-win/fast/forms/input-paste-undo-expected.png: Removed.
* platform/chromium-win/fast/forms/input-paste-undo-expected.txt: Removed.
* platform/efl/fast/forms/input-paste-undo-expected.txt: Removed.
* platform/gtk/fast/forms/input-paste-undo-expected.png: Removed.
* platform/gtk/fast/forms/input-paste-undo-expected.txt: Removed.
* platform/mac-leopard/fast/forms/input-paste-undo-expected.png: Removed.
* platform/mac/fast/forms/input-paste-undo-expected.png: Removed.
* platform/mac/fast/forms/input-paste-undo-expected.txt: Removed.
* platform/qt/fast/forms/input-paste-undo-expected.txt: Removed.

Modified Paths

Added Paths

Removed Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (98885 => 98886)


--- trunk/LayoutTests/ChangeLog	2011-10-31 22:03:22 UTC (rev 98885)
+++ trunk/LayoutTests/ChangeLog	2011-10-31 22:07:03 UTC (rev 98886)
@@ -1,3 +1,31 @@
+2011-10-31  Benjamin Poulain  <[email protected]>
+
+        The test input-paste-undo.html needs update to work properly
+        https://bugs.webkit.org/show_bug.cgi?id=71091
+
+        Reviewed by David Kilzer.
+
+        Update the test to select the text that needs to be copied
+        so that it effectively go in the pasteboard on execCommand.
+
+        The test now dumps result as text, testing if the height does not
+        change with the form edition.
+
+        * fast/forms/input-paste-undo-expected.txt: Added.
+        * fast/forms/input-paste-undo.html:
+        * platform/chromium-linux/fast/forms/input-paste-undo-expected.png: Removed.
+        * platform/chromium-mac-leopard/fast/forms/input-paste-undo-expected.png: Removed.
+        * platform/chromium-mac/fast/forms/input-paste-undo-expected.png: Removed.
+        * platform/chromium-win/fast/forms/input-paste-undo-expected.png: Removed.
+        * platform/chromium-win/fast/forms/input-paste-undo-expected.txt: Removed.
+        * platform/efl/fast/forms/input-paste-undo-expected.txt: Removed.
+        * platform/gtk/fast/forms/input-paste-undo-expected.png: Removed.
+        * platform/gtk/fast/forms/input-paste-undo-expected.txt: Removed.
+        * platform/mac-leopard/fast/forms/input-paste-undo-expected.png: Removed.
+        * platform/mac/fast/forms/input-paste-undo-expected.png: Removed.
+        * platform/mac/fast/forms/input-paste-undo-expected.txt: Removed.
+        * platform/qt/fast/forms/input-paste-undo-expected.txt: Removed.
+
 2011-10-31  Yury Semikhatsky  <[email protected]>
 
         window.onerror doesn't work with inline (attribute) scripts

Added: trunk/LayoutTests/fast/forms/input-paste-undo-expected.txt (0 => 98886)


--- trunk/LayoutTests/fast/forms/input-paste-undo-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/forms/input-paste-undo-expected.txt	2011-10-31 22:07:03 UTC (rev 98886)
@@ -0,0 +1,19 @@
+This test checks that undoing a paste into an empty text field doesn't cause it to collapse vertically.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS document.getElementById("destination").value is ""
+PASS document.getElementById("destination").value is "Text to copy-paste-undo."
+PASS document.getElementById("source").clientHeight == initialClientHeight is true
+PASS window.getComputedStyle(document.getElementById("source")).height == initialClientComputedHeight is true
+PASS document.getElementById("destination").value is ""
+PASS document.getElementById("source").clientHeight == initialClientHeight is true
+PASS window.getComputedStyle(document.getElementById("source")).height == initialClientComputedHeight is true
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
+
+Text to copy-paste-undo.
+

Modified: trunk/LayoutTests/fast/forms/input-paste-undo.html (98885 => 98886)


--- trunk/LayoutTests/fast/forms/input-paste-undo.html	2011-10-31 22:03:22 UTC (rev 98885)
+++ trunk/LayoutTests/fast/forms/input-paste-undo.html	2011-10-31 22:07:03 UTC (rev 98886)
@@ -1,27 +1,43 @@
 <html>
 <head>
 <script src="" language="_javascript_" type="text/_javascript_" ></script>
+<script src=""
+</head>
+<body>
+<p id="description"></p>
+<div id="console"></div>
+
+<br></br>
+<div contenteditable id="source">Text to copy-paste-undo.</div>
+<input type="text" id="destination"></input>
+
 <script>
+description("This test checks that undoing a paste into an empty text field doesn't cause it to collapse vertically.");
 
-function test()
-{ 
-    var res = "";
-    
-    document.getElementById('dv').focus();
-    copyCommand();
-    document.getElementById('tf').focus();
-    pasteCommand();
-    undoCommand();
-}
+var selection = window.getSelection();
+var source = document.getElementById('source');
+selection.selectAllChildren(source);
 
+var initialClientHeight = source.clientHeight;
+var initialClientComputedHeight = window.getComputedStyle(source).height;
+
+copyCommand();
+document.getElementById('destination').focus();
+shouldBeEqualToString('document.getElementById("destination").value', '');
+
+pasteCommand();
+shouldBeEqualToString('document.getElementById("destination").value', 'Text to copy-paste-undo.');
+shouldBeTrue('document.getElementById("source").clientHeight == initialClientHeight');
+shouldBeTrue('window.getComputedStyle(document.getElementById("source")).height == initialClientComputedHeight');
+
+undoCommand();
+shouldBeEqualToString('document.getElementById("destination").value', '');
+shouldBeTrue('document.getElementById("source").clientHeight == initialClientHeight');
+shouldBeTrue('window.getComputedStyle(document.getElementById("source")).height == initialClientComputedHeight');
+
+successfullyParsed = true;
+
 </script>
-</head>
-<body _onload_="test()">
-This test checks that undoing a paste into an empty text field doesn't cause it to collapse vertically. When running manually, you have to paste and undo by hand.
-<br><br>
-<input type="text" id="tf"></input>
-<div contenteditable id="dv">Text to paste</div>
-<div id="result">
-</div>
+<script src=""
 </body>
 </html>

Deleted: trunk/LayoutTests/platform/chromium-linux/fast/forms/input-paste-undo-expected.png


(Binary files differ)

Deleted: trunk/LayoutTests/platform/chromium-mac/fast/forms/input-paste-undo-expected.png


(Binary files differ)

Deleted: trunk/LayoutTests/platform/chromium-mac-leopard/fast/forms/input-paste-undo-expected.png


(Binary files differ)

Deleted: trunk/LayoutTests/platform/chromium-win/fast/forms/input-paste-undo-expected.png


(Binary files differ)

Deleted: trunk/LayoutTests/platform/chromium-win/fast/forms/input-paste-undo-expected.txt (98885 => 98886)


--- trunk/LayoutTests/platform/chromium-win/fast/forms/input-paste-undo-expected.txt	2011-10-31 22:03:22 UTC (rev 98885)
+++ trunk/LayoutTests/platform/chromium-win/fast/forms/input-paste-undo-expected.txt	2011-10-31 22:07:03 UTC (rev 98886)
@@ -1,20 +0,0 @@
-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 784x584
-      RenderBlock (anonymous) at (0,0) size 784x86
-        RenderText {#text} at (0,0) size 759x39
-          text run at (0,0) width 759: "This test checks that undoing a paste into an empty text field doesn't cause it to collapse vertically. When running manually, you"
-          text run at (0,20) width 200: "have to paste and undo by hand. "
-        RenderBR {BR} at (200,35) size 0x0
-        RenderBR {BR} at (0,40) size 0x19
-        RenderTextControl {INPUT} at (2,62) size 155x22 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
-        RenderText {#text} at (0,0) size 0x0
-      RenderBlock {DIV} at (0,86) size 784x20
-        RenderText {#text} at (0,0) size 79x19
-          text run at (0,0) width 79: "Text to paste"
-      RenderBlock {DIV} at (0,106) size 784x0
-layer at (12,73) size 151x16
-  RenderBlock {DIV} at (2,3) size 151x16
-caret: position 0 of child 0 {DIV} of {#shadow-root} of child 4 {INPUT} of body

Deleted: trunk/LayoutTests/platform/efl/fast/forms/input-paste-undo-expected.txt (98885 => 98886)


--- trunk/LayoutTests/platform/efl/fast/forms/input-paste-undo-expected.txt	2011-10-31 22:03:22 UTC (rev 98885)
+++ trunk/LayoutTests/platform/efl/fast/forms/input-paste-undo-expected.txt	2011-10-31 22:07:03 UTC (rev 98886)
@@ -1,20 +0,0 @@
-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 784x584
-      RenderBlock (anonymous) at (0,0) size 784x90
-        RenderText {#text} at (0,0) size 776x38
-          text run at (0,0) width 776: "This test checks that undoing a paste into an empty text field doesn't cause it to collapse vertically. When running manually,"
-          text run at (0,19) width 236: "you have to paste and undo by hand. "
-        RenderBR {BR} at (236,34) size 0x0
-        RenderBR {BR} at (0,38) size 0x19
-        RenderTextControl {INPUT} at (2,59) size 195x29 [color=#202020]
-        RenderText {#text} at (0,0) size 0x0
-      RenderBlock {DIV} at (0,90) size 784x19
-        RenderText {#text} at (0,0) size 81x19
-          text run at (0,0) width 81: "Text to paste"
-      RenderBlock {DIV} at (0,109) size 784x0
-layer at (14,73) size 188x19
-  RenderBlock {DIV} at (4,6) size 188x19
-caret: position 0 of child 0 {DIV} of {#shadow-root} of child 4 {INPUT} of body

Deleted: trunk/LayoutTests/platform/gtk/fast/forms/input-paste-undo-expected.png


(Binary files differ)

Deleted: trunk/LayoutTests/platform/gtk/fast/forms/input-paste-undo-expected.txt (98885 => 98886)


--- trunk/LayoutTests/platform/gtk/fast/forms/input-paste-undo-expected.txt	2011-10-31 22:03:22 UTC (rev 98885)
+++ trunk/LayoutTests/platform/gtk/fast/forms/input-paste-undo-expected.txt	2011-10-31 22:07:03 UTC (rev 98886)
@@ -1,20 +0,0 @@
-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 784x584
-      RenderBlock (anonymous) at (0,0) size 784x86
-        RenderText {#text} at (0,0) size 776x38
-          text run at (0,0) width 776: "This test checks that undoing a paste into an empty text field doesn't cause it to collapse vertically. When running manually,"
-          text run at (0,19) width 236: "you have to paste and undo by hand. "
-        RenderBR {BR} at (236,34) size 0x0
-        RenderBR {BR} at (0,38) size 0x19
-        RenderTextControl {INPUT} at (2,59) size 194x25 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
-        RenderText {#text} at (0,0) size 0x0
-      RenderBlock {DIV} at (0,86) size 784x19
-        RenderText {#text} at (0,0) size 81x19
-          text run at (0,0) width 81: "Text to paste"
-      RenderBlock {DIV} at (0,105) size 784x0
-layer at (13,70) size 188x19
-  RenderBlock {DIV} at (3,3) size 188x19
-caret: position 0 of child 0 {DIV} of {#shadow-root} of child 4 {INPUT} of body

Deleted: trunk/LayoutTests/platform/mac/fast/forms/input-paste-undo-expected.png


(Binary files differ)

Deleted: trunk/LayoutTests/platform/mac/fast/forms/input-paste-undo-expected.txt (98885 => 98886)


--- trunk/LayoutTests/platform/mac/fast/forms/input-paste-undo-expected.txt	2011-10-31 22:03:22 UTC (rev 98885)
+++ trunk/LayoutTests/platform/mac/fast/forms/input-paste-undo-expected.txt	2011-10-31 22:07:03 UTC (rev 98886)
@@ -1,20 +0,0 @@
-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 784x584
-      RenderBlock (anonymous) at (0,0) size 784x77
-        RenderText {#text} at (0,0) size 776x36
-          text run at (0,0) width 776: "This test checks that undoing a paste into an empty text field doesn't cause it to collapse vertically. When running manually,"
-          text run at (0,18) width 236: "you have to paste and undo by hand. "
-        RenderBR {BR} at (236,32) size 0x0
-        RenderBR {BR} at (0,36) size 0x18
-        RenderTextControl {INPUT} at (2,56) size 125x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
-        RenderText {#text} at (0,0) size 0x0
-      RenderBlock {DIV} at (0,77) size 784x18
-        RenderText {#text} at (0,0) size 81x18
-          text run at (0,0) width 81: "Text to paste"
-      RenderBlock {DIV} at (0,95) size 784x0
-layer at (13,67) size 119x13
-  RenderBlock {DIV} at (3,3) size 119x13
-caret: position 0 of child 0 {DIV} of {#shadow-root} of child 4 {INPUT} of body

Deleted: trunk/LayoutTests/platform/mac-leopard/fast/forms/input-paste-undo-expected.png


(Binary files differ)

Deleted: trunk/LayoutTests/platform/qt/fast/forms/input-paste-undo-expected.txt (98885 => 98886)


--- trunk/LayoutTests/platform/qt/fast/forms/input-paste-undo-expected.txt	2011-10-31 22:03:22 UTC (rev 98885)
+++ trunk/LayoutTests/platform/qt/fast/forms/input-paste-undo-expected.txt	2011-10-31 22:07:03 UTC (rev 98886)
@@ -1,20 +0,0 @@
-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 784x584
-      RenderBlock (anonymous) at (0,0) size 784x92
-        RenderText {#text} at (0,0) size 736x42
-          text run at (0,0) width 736: "This test checks that undoing a paste into an empty text field doesn't cause it to collapse vertically. When"
-          text run at (0,21) width 396: "running manually, you have to paste and undo by hand. "
-        RenderBR {BR} at (396,37) size 0x0
-        RenderBR {BR} at (0,42) size 0x21
-        RenderTextControl {INPUT} at (2,65) size 186x25
-        RenderText {#text} at (0,0) size 0x0
-      RenderBlock {DIV} at (0,92) size 784x21
-        RenderText {#text} at (0,0) size 91x21
-          text run at (0,0) width 91: "Text to paste"
-      RenderBlock {DIV} at (0,113) size 784x0
-layer at (12,75) size 182x21
-  RenderBlock {DIV} at (2,2) size 182x21
-caret: position 0 of child 0 {DIV} of {#shadow-root} of child 4 {INPUT} of body
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to