+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.
-ec1788aaf740b20e23893a5750e3bb34
\ No newline at end of file
+1f9431a0f9ebf8ab31ceabe91f53ad0e
\ No newline at end of file
-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
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
--- /dev/null
+<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>
+++ /dev/null
-<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>