Reviewed by levi
authorjusting <justing@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 22 May 2006 22:10:58 +0000 (22:10 +0000)
committerjusting <justing@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 22 May 2006 22:10:58 +0000 (22:10 +0000)
        Fixed and reenabled this test.

        * editing/selection/drag-to-contenteditable-iframe-expected.checksum:
        * editing/selection/drag-to-contenteditable-iframe-expected.png:
        * editing/selection/drag-to-contenteditable-iframe-expected.txt:
        * editing/selection/drag-to-contenteditable-iframe.html: Added.
        * editing/selection/drag-to-contenteditable-iframe.html-disabled: Removed.

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

LayoutTests/ChangeLog
LayoutTests/editing/selection/drag-to-contenteditable-iframe-expected.checksum
LayoutTests/editing/selection/drag-to-contenteditable-iframe-expected.png
LayoutTests/editing/selection/drag-to-contenteditable-iframe-expected.txt
LayoutTests/editing/selection/drag-to-contenteditable-iframe.html [new file with mode: 0644]
LayoutTests/editing/selection/drag-to-contenteditable-iframe.html-disabled [deleted file]

index 8fb582b0cd0b0e34be29f203d171dfc808963935..bb3a6c5afe86ee04b521101255f43ef7ccb9b95b 100644 (file)
@@ -1,3 +1,15 @@
+2006-05-22  Justin Garcia  <justin.garcia@apple.com>
+
+        Reviewed by levi
+        
+        Fixed and reenabled this test.
+
+        * editing/selection/drag-to-contenteditable-iframe-expected.checksum:
+        * editing/selection/drag-to-contenteditable-iframe-expected.png:
+        * editing/selection/drag-to-contenteditable-iframe-expected.txt:
+        * editing/selection/drag-to-contenteditable-iframe.html: Added.
+        * editing/selection/drag-to-contenteditable-iframe.html-disabled: Removed.
+
 2006-05-22  Levi Weintraub  <lweintraub@apple.com>
 
         Reviewed by eric.
index e50efbbddc58a880920e40552e52264644cb616b..63f2f0657664bb464c24f2e59d0010c24f0a934d 100644 (file)
@@ -1 +1 @@
-ec1788aaf740b20e23893a5750e3bb34
\ No newline at end of file
+1f9431a0f9ebf8ab31ceabe91f53ad0e
\ No newline at end of file
index 0c21bdd68350dfc70801b4fdf61760ca2ee5e7b4..18aff4c7396c0e9db2c1c1b1d4b4c83e2ece47d1 100644 (file)
Binary files a/LayoutTests/editing/selection/drag-to-contenteditable-iframe-expected.png and b/LayoutTests/editing/selection/drag-to-contenteditable-iframe-expected.png differ
index 19b02d5e2291de9188bca55b07030f6c5139fea4..4bf31949960d53a4cab39c37519ad7aa2dcb095e 100644 (file)
@@ -1,5 +1,8 @@
-EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 4 of BODY > HTML > #document to 4 of BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
-EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
+EDITING DELEGATE: shouldInsertNode:#document-fragment replacingDOMRange:range from 2 of BODY > HTML > #document to 2 of BODY > HTML > #document givenAction:WebViewInsertActionDropped
+EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 2 of BODY > HTML > #document to 2 of BODY > HTML > #document toDOMRange:range from 0 of #text > BODY > HTML > #document to 5 of #text > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
+EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
+EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of BODY > HTML > #document to 6 of BODY > HTML > #document
+EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
 EDITING DELEGATE: shouldInsertNode:#document-fragment replacingDOMRange:range from 0 of BODY > HTML > #document to 0 of BODY > HTML > #document givenAction:WebViewInsertActionDropped
 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
@@ -19,22 +22,14 @@ layer at (0,0) size 800x600
             RenderBlock {HTML} at (0,0) size 200x200
               RenderBody {BODY} at (8,8) size 184x184 [bgcolor=#FFFFE0]
                 RenderImage {IMG} at (0,0) size 76x103
-        RenderText {TEXT} at (208,194) size 4x18
+        RenderText {#text} at (208,194) size 4x18
           text run at (208,194) width 4: " "
         RenderImage {IMG} at (212,105) size 76x103
-        RenderText {TEXT} at (0,0) size 0x0
-      RenderBlock {UL} at (16,228) size 768x54
-        RenderListItem {LI} at (40,0) size 728x18
-          RenderListMarker at (0,0) size 0x14
-          RenderText {TEXT} at (0,0) size 158x18
-            text run at (0,0) width 158: "Mousing down on image"
-        RenderListItem {LI} at (40,18) size 728x18
-          RenderListMarker at (0,0) size 0x14
-          RenderText {TEXT} at (0,0) size 148x18
-            text run at (0,0) width 148: "Dragging to destination"
-        RenderListItem {LI} at (40,36) size 728x18
-          RenderListMarker at (0,0) size 0x14
-          RenderText {TEXT} at (0,0) size 61x18
-            text run at (0,0) width 61: "Dropping"
+        RenderText {#text} at (0,0) size 0x0
+      RenderBlock {UL} at (0,228) size 800x18
+        RenderListItem {LI} at (40,0) size 760x18
+          RenderListMarker at (-17,0) size 7x18
+          RenderText {#text} at (0,0) size 288x18
+            text run at (0,0) width 288: "Abe should be outside the frame and inside it."
 selection start: position 0 of child 0 {IMG} of child 0 {BODY} of child 0 {HTML} of document
 selection end:   position 1 of child 0 {IMG} of child 0 {BODY} of child 0 {HTML} of document
diff --git a/LayoutTests/editing/selection/drag-to-contenteditable-iframe.html b/LayoutTests/editing/selection/drag-to-contenteditable-iframe.html
new file mode 100644 (file)
index 0000000..1df2d40
--- /dev/null
@@ -0,0 +1,56 @@
+<html>
+<head>
+<script>
+function log(message) {
+    var console = document.getElementById("console");
+    var li = document.createElement("li");
+    var text = document.createTextNode(message);
+    
+    console.appendChild(li);
+    li.appendChild(text);
+}
+
+function runTest() {
+    if (window.layoutTestController)
+        layoutTestController.waitUntilDone();
+    // Let the subframe come into being.
+    window.setTimeout(step2, 100);
+}
+
+function step2() 
+{
+    if (!window.layoutTestController) {
+        log("This test uses the eventSender.  To run it manually, drag the image into the editable frame and drop it.  It should appear inside the editable frame.");
+        return;
+    }
+    
+    log("Abe should be outside the frame and inside it.");
+    
+    e = document.getElementById("dragme");
+    x = e.offsetLeft + e.offsetParent.offsetLeft + e.offsetWidth / 2;
+    y = e.offsetTop + e.offsetParent.offsetTop + e.offsetHeight / 2;
+
+    eventSender.mouseMoveTo(x, y);
+    eventSender.mouseDown();
+    eventSender.leapForward(1000);
+    
+    e = document.getElementById("frame");
+    x = e.offsetLeft + e.offsetParent.offsetLeft + e.offsetWidth / 2;
+    y = e.offsetTop + e.offsetParent.offsetTop + e.offsetHeight / 2;
+    
+    eventSender.mouseMoveTo(x, y);
+    eventSender.mouseUp();
+    
+    layoutTestController.notifyDone();
+}
+</script>
+</head>
+
+<body style="padding:0; margin:0">  
+
+<iframe id="frame" style="width: 200px; height: 200px; border: 4px solid black;" src="../resources/contenteditable-iframe-src.html"></iframe>
+<img id="dragme" src="../resources/abe.jpg">
+
+<ul id="console"></ul>
+<script>runTest();</script>
+</body>
diff --git a/LayoutTests/editing/selection/drag-to-contenteditable-iframe.html-disabled b/LayoutTests/editing/selection/drag-to-contenteditable-iframe.html-disabled
deleted file mode 100644 (file)
index d7b45ae..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-<html>
-
-<head>
-<script>
-
-var startX = 225;
-var startY = 175;
-var endX = 100;
-var endY = 100;
-
-function log(message) {
-    var console = document.getElementById("console");
-    var li = document.createElement("li");
-    var text = document.createTextNode(message);
-    
-    console.appendChild(li);
-    li.appendChild(text);
-}
-
-function runTest() 
-{
-    if (window.layoutTestController)
-        layoutTestController.waitUntilDone();
-    else {
-        log("This test uses DumpRenderTree's drag & drop support to test that an image can successfully be dropped into a contenteditable iframe.  To run it manually, drag the image into the iframe and drop it.  It should appear inside the iframe.");
-        return;
-    }
-
-       window.setTimeout('step1()', 5);
-}
-
-function step1()
-{
-    log("Mousing down on image");
-    eventSender.mouseMoveTo(startX, startY);
-    eventSender.mouseDown();
-
-    window.setTimeout('step2()', 1000);
-}
-
-function step2() {
-    log("Dragging to destination");
-    eventSender.mouseMoveTo(endX + 1, endY + 1);
-    
-    window.setTimeout('step3()', 200);
-    
-}
-
-function step3() {
-    log("Dropping");
-    eventSender.mouseMoveTo(endX, endY);
-
-    eventSender.mouseUp();
-    
-    window.setTimeout('step4()', 200);
-}
-
-function step4()
-{
-    if (window.layoutTestController)
-        layoutTestController.notifyDone();
-}
-
-</script>
-</head>
-
-<body style="padding:0; margin:0">  
-
-<iframe style="margin: 0px; width: 200px; height: 200px; border: 4px solid black;" src="../resources/contenteditable-iframe-src.html"></iframe>
-
-<img src="../resources/abe.jpg">
-<ul style="list-style:circle; margin: 1em;" id="console"></ul>
-<script>runTest()</script>
-</body>