Reviewed by Alexey.
authorandersca <andersca@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 6 Jul 2007 17:08:50 +0000 (17:08 +0000)
committerandersca <andersca@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 6 Jul 2007 17:08:50 +0000 (17:08 +0000)
        <rdar://problem/5313512> fast/frames/frame-set-same-{location,src}.html sometimes hang on Leopard

        Make these tests more robust against frames loading in a different order. Also, turn the tests
        into text tests and remove them from the Leopard skipped list.

        * fast/frames/frame-set-same-location-expected.checksum: Removed.
        * fast/frames/frame-set-same-location-expected.png: Removed.
        * fast/frames/frame-set-same-location-expected.txt:
        * fast/frames/frame-set-same-location.html:
        * fast/frames/frame-set-same-src-expected.checksum: Removed.
        * fast/frames/frame-set-same-src-expected.png: Removed.
        * fast/frames/frame-set-same-src-expected.txt:
        * fast/frames/frame-set-same-src.html:
        * mac/leopard/Skipped:

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

LayoutTests/ChangeLog
LayoutTests/fast/frames/frame-set-same-location-expected.checksum [deleted file]
LayoutTests/fast/frames/frame-set-same-location-expected.png [deleted file]
LayoutTests/fast/frames/frame-set-same-location-expected.txt
LayoutTests/fast/frames/frame-set-same-location.html
LayoutTests/fast/frames/frame-set-same-src-expected.checksum [deleted file]
LayoutTests/fast/frames/frame-set-same-src-expected.png [deleted file]
LayoutTests/fast/frames/frame-set-same-src-expected.txt
LayoutTests/fast/frames/frame-set-same-src.html
LayoutTests/mac/leopard/Skipped

index 4bb0a9a73e1d1c81aa43a91c12c9344b5151a983..0d3ad49268f8870f9d63cfa42d1d6a8388a1f841 100644 (file)
@@ -1,3 +1,22 @@
+2007-07-06  Anders Carlsson  <andersca@apple.com>
+
+        Reviewed by Alexey.
+
+        <rdar://problem/5313512> fast/frames/frame-set-same-{location,src}.html sometimes hang on Leopard
+        
+        Make these tests more robust against frames loading in a different order. Also, turn the tests 
+        into text tests and remove them from the Leopard skipped list.
+        
+        * fast/frames/frame-set-same-location-expected.checksum: Removed.
+        * fast/frames/frame-set-same-location-expected.png: Removed.
+        * fast/frames/frame-set-same-location-expected.txt:
+        * fast/frames/frame-set-same-location.html:
+        * fast/frames/frame-set-same-src-expected.checksum: Removed.
+        * fast/frames/frame-set-same-src-expected.png: Removed.
+        * fast/frames/frame-set-same-src-expected.txt:
+        * fast/frames/frame-set-same-src.html:
+        * mac/leopard/Skipped:
+
 2007-07-06  Mark Rowe  <mrowe@apple.com>
 
         Unreviewed.  Update test results.
diff --git a/LayoutTests/fast/frames/frame-set-same-location-expected.checksum b/LayoutTests/fast/frames/frame-set-same-location-expected.checksum
deleted file mode 100644 (file)
index 7e2ab19..0000000
+++ /dev/null
@@ -1 +0,0 @@
-fce994f988cbf51dd2132ca083fc4f42
\ No newline at end of file
diff --git a/LayoutTests/fast/frames/frame-set-same-location-expected.png b/LayoutTests/fast/frames/frame-set-same-location-expected.png
deleted file mode 100644 (file)
index fb49fa0..0000000
Binary files a/LayoutTests/fast/frames/frame-set-same-location-expected.png and /dev/null differ
index c5c4b8cd8adeae21def1b018c752d896b9fe5989..5383056ece4e50561d385808adfcc3624058e639 100644 (file)
@@ -1,33 +1,5 @@
-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
-    RenderFrameSet {FRAMESET} at (0,0) size 800x600
-      RenderFrame {FRAME} at (0,0) size 397x600
-        layer at (0,0) size 397x600
-          RenderView at (0,0) size 397x600
-        layer at (0,0) size 397x600
-          RenderBlock {HTML} at (0,0) size 397x600
-            RenderBody {BODY} at (8,8) size 381x576
-              RenderBlock {P} at (0,0) size 381x36
-                RenderText {#text} at (0,0) size 53x18
-                  text run at (0,0) width 53: "Test for "
-                RenderInline {A} at (0,0) size 60x18 [color=#0000EE]
-                  RenderText {#text} at (53,0) size 60x18
-                    text run at (53,0) width 60: "bug 3400"
-                RenderText {#text} at (113,0) size 366x36
-                  text run at (113,0) width 253: ": setting the .src of an iframe to the same"
-                  text run at (0,18) width 172: "value does not reload page."
-              RenderBlock {P} at (0,52) size 381x36
-                RenderText {#text} at (0,0) size 375x36
-                  text run at (0,0) width 375: "Testing that setting contentWindow.location.href of a frame"
-                  text run at (0,18) width 152: "to the same value works"
-              RenderBlock {P} at (0,104) size 381x18
-                RenderText {#text} at (0,0) size 71x18
-                  text run at (0,0) width 71: "SUCCESS"
-      RenderFrame {FRAME} at (403,0) size 397x600
-        layer at (0,0) size 397x600
-          RenderView at (0,0) size 397x600
-        layer at (0,0) size 397x600
-          RenderBlock {HTML} at (0,0) size 397x600
-            RenderBody {BODY} at (8,8) size 381x584 [bgcolor=#800080]
+Test for bug 3400: setting the .src of an iframe to the same value does not reload page.
+
+Testing that setting contentWindow.location.href of a frame to the same value works
+
+SUCCESS
index 2bc496315a83a899771140172c83a4ba3ada2042..3ec0b0e790be3534258f0e76262ddfa8b21d0ec9 100644 (file)
@@ -7,22 +7,40 @@
     if (window.layoutTestController)
         layoutTestController.waitUntilDone();
 
-    function reportSuccess() {
-               console = document.getElementById("left_frame").contentWindow.document.getElementById("console");
-               if (console.firstChild.nodeValue == "FAILURE") {
+    function rightFrameLoaded() {
+        rightFrameLoadCount++;
+        if (rightFrameLoadCount == 2) {
+            // Console is set by runTest
+            console.firstChild.nodeValue = "SUCCESS";
+            
+            if (window.layoutTestController) {
+                // Put the test result in the main document so we can dump as text
+                var text = console.ownerDocument.documentElement.innerHTML;
+                document.open();
+                document.write(text);
+                document.close();
+                
+                layoutTestController.dumpAsText();
+                layoutTestController.notifyDone();
+            }
+        }
+    }
+    
+    function runTest() {
+        console = document.getElementById("left_frame").contentWindow.document.getElementById("console");
+        if (console.firstChild.nodeValue == "FAILURE") {
             console.firstChild.nodeValue = "PROCESSING...";
             document.getElementById("right_frame").contentWindow.location.href = "resources/purple.html";
         } else {
-            console.firstChild.nodeValue = "SUCCESS";
-            if (window.layoutTestController)
-                layoutTestController.notifyDone();
+            alert('TEST FAILURE: Unexpected onload call')
         }
     }
     
+    rightFrameLoadCount = 0;
 </script>
 </head>
-<frameset cols="50%,*">
+<frameset onload="runTest()" cols="50%,*">
 <frame id="left_frame" src="data:text/html,<body><p>Test for <a href='http://bugzilla.opendarwin.org/show_bug.cgi?id=3400'>bug 3400</a>: setting the .src of an iframe to the same value does not reload page.</p><p>Testing that setting contentWindow.location.href of a frame to the same value works</p><p id=console>FAILURE</p></body>">
-<frame id="right_frame" onload="javascript:reportSuccess()" src="resources/purple.html"></iframe>
+<frame id="right_frame" onload="javascript:rightFrameLoaded()" src="resources/purple.html"></frame>
 </frameset>
 </html>
diff --git a/LayoutTests/fast/frames/frame-set-same-src-expected.checksum b/LayoutTests/fast/frames/frame-set-same-src-expected.checksum
deleted file mode 100644 (file)
index ecb0dbe..0000000
+++ /dev/null
@@ -1 +0,0 @@
-5456a0bf6129fce73ec6eb13da2e4bb7
\ No newline at end of file
diff --git a/LayoutTests/fast/frames/frame-set-same-src-expected.png b/LayoutTests/fast/frames/frame-set-same-src-expected.png
deleted file mode 100644 (file)
index 40763cf..0000000
Binary files a/LayoutTests/fast/frames/frame-set-same-src-expected.png and /dev/null differ
index 9c883933a8e93377ac17dd518dcb4238a5fd6c81..86021bcbc8def51942284938d3f8504ba0172088 100644 (file)
@@ -1,33 +1,5 @@
-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
-    RenderFrameSet {FRAMESET} at (0,0) size 800x600
-      RenderFrame {FRAME} at (0,0) size 397x600
-        layer at (0,0) size 397x600
-          RenderView at (0,0) size 397x600
-        layer at (0,0) size 397x600
-          RenderBlock {HTML} at (0,0) size 397x600
-            RenderBody {BODY} at (8,8) size 381x576
-              RenderBlock {P} at (0,0) size 381x36
-                RenderText {#text} at (0,0) size 53x18
-                  text run at (0,0) width 53: "Test for "
-                RenderInline {A} at (0,0) size 60x18 [color=#0000EE]
-                  RenderText {#text} at (53,0) size 60x18
-                    text run at (53,0) width 60: "bug 3400"
-                RenderText {#text} at (113,0) size 366x36
-                  text run at (113,0) width 253: ": setting the .src of an iframe to the same"
-                  text run at (0,18) width 172: "value does not reload page."
-              RenderBlock {P} at (0,52) size 381x36
-                RenderText {#text} at (0,0) size 341x36
-                  text run at (0,0) width 341: "Testing that setting an src of a frame to the same value"
-                  text run at (0,18) width 39: "works"
-              RenderBlock {P} at (0,104) size 381x18
-                RenderText {#text} at (0,0) size 71x18
-                  text run at (0,0) width 71: "SUCCESS"
-      RenderFrame {FRAME} at (403,0) size 397x600
-        layer at (0,0) size 397x600
-          RenderView at (0,0) size 397x600
-        layer at (0,0) size 397x600
-          RenderBlock {HTML} at (0,0) size 397x600
-            RenderBody {BODY} at (8,8) size 381x584 [bgcolor=#800080]
+Test for bug 3400: setting the .src of an iframe to the same value does not reload page.
+
+Testing that setting an src of a frame to the same value works
+
+SUCCESS
index 3580fc7e2f97e243440ebcabcce8e6bef20c9214..53dd940fe29a13722d45876ff30d60ee0ff2435d 100644 (file)
@@ -7,22 +7,40 @@
     if (window.layoutTestController)
         layoutTestController.waitUntilDone();
 
-    function reportSuccess() {
-               console = document.getElementById("left_frame").contentWindow.document.getElementById("console");
-               if (console.firstChild.nodeValue == "FAILURE") {
+    function rightFrameLoaded() {
+        rightFrameLoadCount++;
+        if (rightFrameLoadCount == 2) {
+            // Console is set by runTest
+            console.firstChild.nodeValue = "SUCCESS";
+
+            if (window.layoutTestController) {
+                // Put the test result in the main document so we can dump as text
+                var text = console.ownerDocument.documentElement.innerHTML;
+                document.open();
+                document.write(text);
+                document.close();
+
+                layoutTestController.dumpAsText();
+                layoutTestController.notifyDone();
+            }
+        }
+    }
+
+    function runTest() {
+        console = document.getElementById("left_frame").contentWindow.document.getElementById("console");
+        if (console.firstChild.nodeValue == "FAILURE") {
             console.firstChild.nodeValue = "PROCESSING...";
             document.getElementById("right_frame").src = "resources/purple.html";
         } else {
-            console.firstChild.nodeValue = "SUCCESS";
-            if (window.layoutTestController)
-                layoutTestController.notifyDone();
+            alert('TEST FAILURE: Unexpected onload call')
         }
     }
     
+    rightFrameLoadCount = 0;
 </script>
 </head>
-<frameset cols="50%,*">
+<frameset onload="runTest()" cols="50%,*">
 <frame id="left_frame" src="data:text/html,<body><p>Test for <a href='http://bugzilla.opendarwin.org/show_bug.cgi?id=3400'>bug 3400</a>: setting the .src of an iframe to the same value does not reload page.</p><p>Testing that setting an src of a frame to the same value works</p><p id=console>FAILURE</p></body>">
-<frame id="right_frame" onload="javascript:reportSuccess()" src="resources/purple.html"></iframe>
+<frame id="right_frame" onload="javascript:rightFrameLoaded()" src="resources/purple.html"></frame>
 </frameset>
 </html>
index 2fef4ea4d751b5bc7e3f77f49fdfde96375d469d..72e66b6b0b5255e7a489ffc8ac88651e3dbdd477 100644 (file)
@@ -61,10 +61,6 @@ fast/text/international/thai-line-breaks.html
 # <rdar://problem/5313508> http/tests/xmlhttprequest/basic-auth.html hangs on Leopard
 http/tests/xmlhttprequest/basic-auth.html
 
-# <rdar://problem/5313512> fast/frames/frame-set-same-{location,src}.html sometimes hangs on Leopard
-fast/frames/frame-set-same-location.html
-fast/frames/frame-set-same-src.html
-
 # <rdar://problem/5313531> editing/pasteboard/copy-in-password-field.html sometimes fails on Leopard
 editing/pasteboard/copy-in-password-field.html