[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.15.1-1414-gc69ee75

jparent at chromium.org jparent at chromium.org
Thu Oct 29 20:44:44 UTC 2009


The following commit has been merged in the webkit-1.1 branch:
commit 9fc336da002e3df00e9195c5202f3e2e5325d701
Author: jparent at chromium.org <jparent at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Oct 14 22:38:47 2009 +0000

    https://bugs.webkit.org/show_bug.cgi?id=30269
    Use onload to detect iframe load, rather than setTimeout.
    This will give more consistent test results and hopefully faster run times.
    
    Patch by Julie Parent <jparent at chromium.org> on 2009-10-13
    Reviewed by Darin Adler.
    
    * editing/execCommand/paste-1.html:
    * editing/execCommand/paste-2.html:
    * editing/pasteboard/subframe-dragndrop-1.html:
    * editing/selection/4776665.html:
    * editing/selection/4975120.html:
    * editing/selection/5136696.html:
    * editing/selection/drag-to-contenteditable-iframe.html:
    * platform/mac/editing/selection/5136696-expected.txt: Rebaselined because moving a script tag eliminated an empty text node.
    * platform/qt/editing/selection/5136696-expected.txt: Rebaselined because moving a script tag eliminated an empty text node.
    * platform/win/editing/selection/5136696-expected.txt: Rebaselined because moving a script tag eliminated an empty text node.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@49592 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 31e105c..18afbd2 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,22 @@
+2009-10-13  Julie Parent  <jparent at chromium.org>
+
+        Reviewed by Darin Adler.
+
+        https://bugs.webkit.org/show_bug.cgi?id=30269
+        Use onload to detect iframe load, rather than setTimeout.
+        This will give more consistent test results and hopefully faster run times.
+
+        * editing/execCommand/paste-1.html:
+        * editing/execCommand/paste-2.html:
+        * editing/pasteboard/subframe-dragndrop-1.html:
+        * editing/selection/4776665.html:
+        * editing/selection/4975120.html:
+        * editing/selection/5136696.html:
+        * editing/selection/drag-to-contenteditable-iframe.html:
+        * platform/mac/editing/selection/5136696-expected.txt: Rebaselined because moving a script tag eliminated an empty text node.
+        * platform/qt/editing/selection/5136696-expected.txt: Rebaselined because moving a script tag eliminated an empty text node.
+        * platform/win/editing/selection/5136696-expected.txt: Rebaselined because moving a script tag eliminated an empty text node.
+
 2009-10-14  Evan Martin  <evan at chromium.org>
 
         Reviewed by Darin Adler.
diff --git a/LayoutTests/editing/execCommand/paste-1.html b/LayoutTests/editing/execCommand/paste-1.html
index d387609..b1ea1b2 100644
--- a/LayoutTests/editing/execCommand/paste-1.html
+++ b/LayoutTests/editing/execCommand/paste-1.html
@@ -1,11 +1,7 @@
 <script>
 if (window.layoutTestController)
      layoutTestController.dumpEditingCallbacks();
-</script>
-<p>This tests cut/paste inside an editable iframe.  You should see 'foo bar baz' below.</p>
-<iframe src="../resources/contenteditable-iframe-src.html"></iframe>
 
-<script>
 function foo() {
     var frame = frames[0];
     var sel = frame.getSelection();
@@ -21,5 +17,7 @@ function foo() {
 }
 if (window.layoutTestController)
     window.layoutTestController.waitUntilDone();
-window.setTimeout(foo, 100);
-</script>
\ No newline at end of file
+</script>
+
+<p>This tests cut/paste inside an editable iframe.  You should see 'foo bar baz' below.</p>
+<iframe src="../resources/contenteditable-iframe-src.html" onload="foo();"></iframe>
diff --git a/LayoutTests/editing/execCommand/paste-2.html b/LayoutTests/editing/execCommand/paste-2.html
index 8d1bc5c..36770d2 100644
--- a/LayoutTests/editing/execCommand/paste-2.html
+++ b/LayoutTests/editing/execCommand/paste-2.html
@@ -1,11 +1,7 @@
 <script>
 if (window.layoutTestController)
      layoutTestController.dumpEditingCallbacks();
-</script>
-<p>This tests copy/delete/paste inside an editable iframe.  You should see 'foo bar baz' below.</p>
-<iframe src="../resources/contenteditable-iframe-src.html"></iframe>
 
-<script>
 function runTest() {
     var frame = frames[0];
     var sel = frame.getSelection();
@@ -20,7 +16,9 @@ function runTest() {
     if (window.layoutTestController)
         window.layoutTestController.notifyDone();
 }
+
 if (window.layoutTestController)
     window.layoutTestController.waitUntilDone();
-window.setTimeout(runTest, 100);
-</script>
\ No newline at end of file
+</script>
+<p>This tests copy/delete/paste inside an editable iframe.  You should see 'foo bar baz' below.</p>
+<iframe src="../resources/contenteditable-iframe-src.html" onload="runTest();"></iframe>
diff --git a/LayoutTests/editing/pasteboard/subframe-dragndrop-1.html b/LayoutTests/editing/pasteboard/subframe-dragndrop-1.html
index a1202d5..a85f1f2 100644
--- a/LayoutTests/editing/pasteboard/subframe-dragndrop-1.html
+++ b/LayoutTests/editing/pasteboard/subframe-dragndrop-1.html
@@ -1,11 +1,7 @@
 <script>
 if (window.layoutTestController)
      layoutTestController.dumpEditingCallbacks();
-</script>
-<body style="margin: 0px; padding: 0px;">
-<iframe style="margin: 0; padding: 0; height: 300px; width: 300px;" src="../resources/contenteditable-iframe-src.html"></iframe>
-<p>This test uses the eventSender to do drag and drop. To run it manually, drag the word selected in the above subframe and drop it after 'baz'.  The result should be 'foo baz bar'.</p>
-<script>
+     
 function runTest() {
     var frame = frames[0];
     var doc = frame.document;
@@ -41,8 +37,9 @@ function runTest() {
     }
 }
 if (window.layoutTestController)
-    window.layoutTestController.waitUntilDone();
-// Give the subframe a moment to load.
-window.setTimeout(runTest, 100);
+    window.layoutTestController.waitUntilDone();         
 </script>
+<body style="margin: 0px; padding: 0px;">
+<iframe style="margin: 0; padding: 0; height: 300px; width: 300px;" src="../resources/contenteditable-iframe-src.html" onload="runTest();"></iframe>
+<p>This test uses the eventSender to do drag and drop. To run it manually, drag the word selected in the above subframe and drop it after 'baz'.  The result should be 'foo baz bar'.</p>
 </body>
\ No newline at end of file
diff --git a/LayoutTests/editing/selection/4776665.html b/LayoutTests/editing/selection/4776665.html
index 25561f9..f03e1e2 100644
--- a/LayoutTests/editing/selection/4776665.html
+++ b/LayoutTests/editing/selection/4776665.html
@@ -1,17 +1,9 @@
 <script>
-if (window.layoutTestController)
+if (window.layoutTestController) {
      layoutTestController.dumpEditingCallbacks();
-</script>
-<p>This tests for a caret painting bug.  You should not see a caret in the editable subframe below.</p>
-<iframe src="../resources/contenteditable-iframe-src.html"></iframe>
-
-<script>
-if (window.layoutTestController)
-    window.layoutTestController.waitUntilDone();
+     window.layoutTestController.waitUntilDone();
+}
     
-// Wait for the frame to load.
-window.setTimeout(runTest, 200);
-
 function runTest() {
     var frame = frames[0];
     var doc = frame.document;
@@ -21,4 +13,6 @@ function runTest() {
     if (window.layoutTestController)
         window.layoutTestController.notifyDone();
 }
-</script>
\ No newline at end of file
+</script>
+<p>This tests for a caret painting bug.  You should not see a caret in the editable subframe below.</p>
+<iframe src="../resources/contenteditable-iframe-src.html" onload="runTest();"></iframe>
diff --git a/LayoutTests/editing/selection/4975120.html b/LayoutTests/editing/selection/4975120.html
index fdb28ac..b61e596 100644
--- a/LayoutTests/editing/selection/4975120.html
+++ b/LayoutTests/editing/selection/4975120.html
@@ -1,9 +1,10 @@
-<body>
-<p>This tests for a bug that caused the parent of an active frame to paint as though it were active when its window becomes key.  To run manually, make another window active and then make this window active. Only the subframe should appear active.</p>
-<input id="input" type="text" value="foo"><br>
-<iframe src="../resources/contenteditable-iframe-src.html"></iframe></body>
-
+<head>
 <script>
+function runTest() {
+    if (window.layoutTestController)
+        window.layoutTestController.waitUntilDone();
+}
+
 function step2() {
     var input = document.getElementById("input");
     input.setSelectionRange(0, 3);
@@ -18,12 +19,13 @@ function step2() {
     window.layoutTestController.setWindowIsKey(true);
     window.layoutTestController.notifyDone();
 }
+</script>
+</head>
+<body>
+<p>This tests for a bug that caused the parent of an active frame to paint as though it were active when its window becomes key.  To run manually, make another window active and then make this window active. Only the subframe should appear active.</p>
+<input id="input" type="text" value="foo"><br>
+<iframe src="../resources/contenteditable-iframe-src.html" onload="step2();"></iframe></body>
 
-function runTest() {
-    if (window.layoutTestController)
-        window.layoutTestController.waitUntilDone();
-    window.setTimeout(step2, 200);
-}
-
+<script>
 runTest();
 </script>
diff --git a/LayoutTests/editing/selection/5136696.html b/LayoutTests/editing/selection/5136696.html
index 86c493b..7dea671 100644
--- a/LayoutTests/editing/selection/5136696.html
+++ b/LayoutTests/editing/selection/5136696.html
@@ -1,8 +1,7 @@
-<p>This tests to make sure that a selection in one from isn't cleared when focusing a node in a different frame.</p>
-<iframe border="1" src="../resources/contenteditable-iframe-src.html"></iframe><br>
-<input type="text" id="input" value="This text field should be focused." size="30">
-
 <script>
+if (window.layoutTestController)
+    window.layoutTestController.waitUntilDone();
+    
 function runTest() {
     frame = frames[0];
     frame.focus();
@@ -14,7 +13,8 @@ function runTest() {
     if (window.layoutTestController)
         window.layoutTestController.notifyDone();
 }
-if (window.layoutTestController)
-    window.layoutTestController.waitUntilDone();
-window.setTimeout(runTest, 200);
 </script>
+<p>This tests to make sure that a selection in one from isn't cleared when focusing a node in a different frame.</p>
+<iframe border="1" src="../resources/contenteditable-iframe-src.html" onload="runTest();"></iframe><br>
+<input type="text" id="input" value="This text field should be focused." size="30">
+
diff --git a/LayoutTests/editing/selection/drag-to-contenteditable-iframe.html b/LayoutTests/editing/selection/drag-to-contenteditable-iframe.html
index d46ff06..a19c715 100644
--- a/LayoutTests/editing/selection/drag-to-contenteditable-iframe.html
+++ b/LayoutTests/editing/selection/drag-to-contenteditable-iframe.html
@@ -1,11 +1,12 @@
 <html>
 <head>
 <script>
-if (window.layoutTestController)
+if (window.layoutTestController) {
      layoutTestController.dumpEditingCallbacks();
-</script>
+     layoutTestController.waitUntilDone();
+}
 
-<script>
+var loadedResources = 0;
 function log(message) {
     var console = document.getElementById("console");
     var li = document.createElement("li");
@@ -15,11 +16,12 @@ function log(message) {
     li.appendChild(text);
 }
 
-function runTest() {
-    if (window.layoutTestController)
-        layoutTestController.waitUntilDone();
-    // Let the subframe come into being.
-    window.setTimeout(step2, 100);
+function runTest() {     
+   // We need to wait for both the image and the iframe to load.
+   loadedResources++;
+   if (loadedResources == 2) {
+     step2();
+   }
 }
 
 function step2() 
@@ -53,9 +55,8 @@ function step2()
 
 <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.png">
+<iframe id="frame" style="width: 200px; height: 200px; border: 4px solid black;" src="../resources/contenteditable-iframe-src.html" onload="runTest();"></iframe>
+<img id="dragme" src="../resources/abe.png" onload="runTest();">
 
 <ul id="console"></ul>
-<script>runTest();</script>
 </body>
diff --git a/LayoutTests/platform/mac/editing/selection/5136696-expected.txt b/LayoutTests/platform/mac/editing/selection/5136696-expected.txt
index b5a5891..40da6b9 100644
--- a/LayoutTests/platform/mac/editing/selection/5136696-expected.txt
+++ b/LayoutTests/platform/mac/editing/selection/5136696-expected.txt
@@ -21,7 +21,6 @@ layer at (0,0) size 800x600
         RenderBR {BR} at (304,154) size 0x0
         RenderTextControl {INPUT} at (2,156) size 182x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
         RenderText {#text} at (0,0) size 0x0
-        RenderText {#text} at (0,0) size 0x0
 layer at (13,201) size 176x13 scrollWidth 183
   RenderBlock {DIV} at (3,3) size 176x13
     RenderText {#text} at (1,0) size 181x13
diff --git a/LayoutTests/platform/qt/editing/selection/5136696-expected.txt b/LayoutTests/platform/qt/editing/selection/5136696-expected.txt
index 44a37ab..d653b21 100644
--- a/LayoutTests/platform/qt/editing/selection/5136696-expected.txt
+++ b/LayoutTests/platform/qt/editing/selection/5136696-expected.txt
@@ -19,7 +19,6 @@ layer at (0,0) size 800x600
         RenderBR {BR} at (304,154) size 0x0
         RenderTextControl {INPUT} at (2,156) size 248x25 [border: (2px inset #000000)]
         RenderText {#text} at (0,0) size 0x0
-        RenderText {#text} at (0,0) size 0x0
 layer at (13,200) size 242x19
   RenderBlock {DIV} at (3,3) size 242x19
     RenderText {#text} at (1,0) size 208x19
diff --git a/LayoutTests/platform/win/editing/selection/5136696-expected.txt b/LayoutTests/platform/win/editing/selection/5136696-expected.txt
index e62ad97..5e0769c 100644
--- a/LayoutTests/platform/win/editing/selection/5136696-expected.txt
+++ b/LayoutTests/platform/win/editing/selection/5136696-expected.txt
@@ -21,7 +21,6 @@ layer at (0,0) size 800x600
         RenderBR {BR} at (304,154) size 0x0
         RenderTextControl {INPUT} at (2,156) size 221x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
         RenderText {#text} at (0,0) size 0x0
-        RenderText {#text} at (0,0) size 0x0
 layer at (13,201) size 215x13
   RenderBlock {DIV} at (3,3) size 215x13
     RenderText {#text} at (1,0) size 181x13

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list