WebCore:
authorddkilzer <ddkilzer@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 23 Aug 2007 20:13:16 +0000 (20:13 +0000)
committerddkilzer <ddkilzer@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 23 Aug 2007 20:13:16 +0000 (20:13 +0000)
        Updated old ChangeLog entry with bug title and test information.

WebKitTools:

        Reviewed by Darin and Adam.

        - DumpRenderTree changes to allow testing for
          http://bugs.webkit.org/show_bug.cgi?id=11756
          REGRESSION: link targeting a frame in another window does not work
          <rdar://problem/5286420>

        Use a frame group name for all WebViews created by DumpRenderTree to
        allow testing of cross-page frame lookup.

        * DumpRenderTree/DumpRenderTree.m:
        (createWebView): Pass group name to -[WebView initWithFrame:frameName:groupName:].
        * DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/DumpRenderTree.cpp:
        (main): Pass group name to WebView::initWithFrame(RECT, BSTR, BSTR).

LayoutTests:

        Reviewed by Adam.

        - test for http://bugs.webkit.org/show_bug.cgi?id=11756
          REGRESSION: link targeting a frame in another window does not work
          <rdar://problem/5286420>

        * http/tests/navigation/resources/target-frame-from-window-end.html: Added.
        * http/tests/navigation/resources/target-frame-from-window-popup.html: Added.
        * http/tests/navigation/resources/target-frame-from-window-start.html: Added.
        * http/tests/navigation/target-frame-from-window-expected.txt: Added.
        * http/tests/navigation/target-frame-from-window.html: Added.
        * platform/win/Skipped: Added http/tests/navigation/target-frame-from-window.html to skip list.

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

LayoutTests/ChangeLog
LayoutTests/http/tests/navigation/resources/target-frame-from-window-end.html [new file with mode: 0644]
LayoutTests/http/tests/navigation/resources/target-frame-from-window-popup.html [new file with mode: 0644]
LayoutTests/http/tests/navigation/resources/target-frame-from-window-start.html [new file with mode: 0644]
LayoutTests/http/tests/navigation/target-frame-from-window-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/navigation/target-frame-from-window.html [new file with mode: 0644]
LayoutTests/platform/win/Skipped
WebCore/ChangeLog
WebKitTools/ChangeLog
WebKitTools/DumpRenderTree/DumpRenderTree.m
WebKitTools/DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/DumpRenderTree.cpp

index e540ea4398bc8d716f4b7812c3e39755eb70255f..079f4569a2234bc4812d44f2ffe760d49f457a9b 100644 (file)
@@ -1,3 +1,18 @@
+2007-08-23  David Kilzer  <ddkilzer@webkit.org>
+
+        Reviewed by Adam.
+
+        - test for http://bugs.webkit.org/show_bug.cgi?id=11756
+          REGRESSION: link targeting a frame in another window does not work
+          <rdar://problem/5286420>
+
+        * http/tests/navigation/resources/target-frame-from-window-end.html: Added.
+        * http/tests/navigation/resources/target-frame-from-window-popup.html: Added.
+        * http/tests/navigation/resources/target-frame-from-window-start.html: Added.
+        * http/tests/navigation/target-frame-from-window-expected.txt: Added.
+        * http/tests/navigation/target-frame-from-window.html: Added.
+        * platform/win/Skipped: Added http/tests/navigation/target-frame-from-window.html to skip list.
+
 2007-08-23  Justin Garcia  <justin.garcia@apple.com>
 
         Reviewed by Adele.
diff --git a/LayoutTests/http/tests/navigation/resources/target-frame-from-window-end.html b/LayoutTests/http/tests/navigation/resources/target-frame-from-window-end.html
new file mode 100644 (file)
index 0000000..43541f8
--- /dev/null
@@ -0,0 +1,16 @@
+<html>
+<head>
+<script type="text/javascript">
+function done()
+{
+    if (window.layoutTestController) {
+        // Allow child window to close to prevent hangs during testing
+        setTimeout("layoutTestController.notifyDone()", 100);
+    }
+}
+</script>
+</head>
+<body onload="done()">
+<span style="color: green;">PASS</span> New page loaded from popup window
+</body>
+</html>
diff --git a/LayoutTests/http/tests/navigation/resources/target-frame-from-window-popup.html b/LayoutTests/http/tests/navigation/resources/target-frame-from-window-popup.html
new file mode 100644 (file)
index 0000000..1feae37
--- /dev/null
@@ -0,0 +1,17 @@
+<html>
+<head>
+<script type="text/javascript">
+function click()
+{
+    var event = document.createEvent('MouseEvent');
+    event.initEvent('click', true, true);
+    document.getElementById('link').dispatchEvent(event);
+    window.close();
+}
+</script>
+</head>
+<body onload="click()">
+<a id="link" href="target-frame-from-window-end.html" target="test">Click Here</a>
+This is a popup.
+</body>
+</html>
diff --git a/LayoutTests/http/tests/navigation/resources/target-frame-from-window-start.html b/LayoutTests/http/tests/navigation/resources/target-frame-from-window-start.html
new file mode 100644 (file)
index 0000000..2a86515
--- /dev/null
@@ -0,0 +1 @@
+<span style="color: red;">FAIL</span> New content was not loaded from second window
diff --git a/LayoutTests/http/tests/navigation/target-frame-from-window-expected.txt b/LayoutTests/http/tests/navigation/target-frame-from-window-expected.txt
new file mode 100644 (file)
index 0000000..6f2d613
--- /dev/null
@@ -0,0 +1,6 @@
+
+
+--------
+Frame: 'test'
+--------
+PASS New page loaded from popup window
diff --git a/LayoutTests/http/tests/navigation/target-frame-from-window.html b/LayoutTests/http/tests/navigation/target-frame-from-window.html
new file mode 100644 (file)
index 0000000..eda105f
--- /dev/null
@@ -0,0 +1,27 @@
+<html>
+<head>
+<title>Test Bugzilla Bug 11756 - REGRESSION: link targeting a frame in another window does not work</title>
+<script type="text/javascript">
+<!--
+if (window.layoutTestController) {
+    layoutTestController.setCanOpenWindows();
+    layoutTestController.dumpAsText();
+    layoutTestController.dumpChildFramesAsText();
+    layoutTestController.waitUntilDone();
+}
+
+var runOnce = 0;
+function openPopup()
+{
+    if (runOnce) return;
+    runOnce++;
+    var opt="toolbar=0,location=0,menubar=0,scrollbars=1,resizable=1,width=300,height=500";
+    window.open('resources/target-frame-from-window-popup.html', "popup", opt);
+}
+// -->
+</script>
+</head>
+<frameset cols="*">
+    <frame name="test" src="resources/target-frame-from-window-start.html" marginwidth="0" marginheight="0" scrolling="auto" frameborder="0" onload="openPopup()">
+</frameset>
+</html>
index 5431b3876319f29812ec4703a41872a3f541375e..7a17e5db262e2d119d5c0af7d9b236fd210ece33 100644 (file)
@@ -269,6 +269,7 @@ editing/pasteboard/drag-drop-modifies-page.html
 # DumpRenderTree doesn't support multiple windows <rdar://problem/5208288>
 fast/dom/open-and-close-by-DOM.html
 fast/history/history_reload.html
+http/tests/navigation/target-frame-from-window.html
 http/tests/security/dataURL/xss-DENIED-from-data-url-in-foriegn-domain-window-open.html
 http/tests/security/dataURL/xss-DENIED-from-javascript-url-window-open.html
 http/tests/security/dataURL/xss-DENIED-to-data-url-in-foriegn-domain-window-open.html
index 7129994b9d6adeaa80376d81cf703aeff20776d7..df88f89f3dc7514190ad2c4ff0031321d77d5167 100644 (file)
         Reviewed by Darin.
 
         - fix http://bugs.webkit.org/show_bug.cgi?id=11756
+          REGRESSION: link targeting a frame in another window does not work
           <rdar://problem/5286420>
 
+        Test: http/tests/navigation/target-frame-from-window.html
+
         Fix a typo error to really compare the present domain to the domain of the parent of the targeted frame.
 
         * loader/FrameLoader.cpp: (WebCore::FrameLoader::canTarget):
index 020b38ed524f53780ef91355e21e1b5582024895..e5bbc52f6c4b593130d8007e67b32c093cefd882 100644 (file)
@@ -1,3 +1,20 @@
+2007-08-23  Mitz Pettel  <mitz@webkit.org>
+
+        Reviewed by Darin and Adam.
+
+        - DumpRenderTree changes to allow testing for
+          http://bugs.webkit.org/show_bug.cgi?id=11756
+          REGRESSION: link targeting a frame in another window does not work
+          <rdar://problem/5286420>
+
+        Use a frame group name for all WebViews created by DumpRenderTree to
+        allow testing of cross-page frame lookup.
+
+        * DumpRenderTree/DumpRenderTree.m:
+        (createWebView): Pass group name to -[WebView initWithFrame:frameName:groupName:].
+        * DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/DumpRenderTree.cpp:
+        (main): Pass group name to WebView::initWithFrame(RECT, BSTR, BSTR).
+
 2007-08-23  David Kilzer  <ddkilzer@webkit.org>
 
         Reviewed by Adam.
index 2ec217613942ef91cd23413493ea11b503f7e2f3..e949fb1c201672937e4e9b4ed6c1d715e91c4575 100644 (file)
@@ -378,7 +378,7 @@ static void makeLargeMallocFailSilently(void)
 WebView *createWebView()
 {
     NSRect rect = NSMakeRect(0, 0, maxViewWidth, maxViewHeight);
-    WebView *webView = [[WebView alloc] initWithFrame:rect];
+    WebView *webView = [[WebView alloc] initWithFrame:rect frameName:nil groupName:@"org.webkit.DumpRenderTree"];
         
     [webView setUIDelegate:uiDelegate];
     [webView setFrameLoadDelegate:frameLoadDelegate];
index ccb4f1d6b05fc262285177eb31df9527f67d9937..6f5718b2dc479458045a8bfb5382546195394332 100644 (file)
@@ -774,7 +774,10 @@ int main(int argc, char* argv[])
 
     RECT clientRect;
     clientRect.bottom = clientRect.left = clientRect.top = clientRect.right = 0;
-    if (FAILED(webView->initWithFrame(clientRect, 0, 0)))
+    BSTR groupName = SysAllocString(L"org.webkit.DumpRenderTree");
+    bool failed = FAILED(webView->initWithFrame(clientRect, 0, groupName));
+    SysFreeString(groupName);
+    if (failed)
         return -1;
 
     COMPtr<IWebViewPrivate> viewPrivate;
@@ -786,7 +789,7 @@ int main(int argc, char* argv[])
     BSTR pluginPath = SysAllocStringLen(0, exePath.length() + _tcslen(TestPluginDir));
     _tcscpy(pluginPath, exePath.c_str());
     _tcscat(pluginPath, TestPluginDir);
-    bool failed = FAILED(viewPrivate->addAdditionalPluginPath(pluginPath));
+    failed = FAILED(viewPrivate->addAdditionalPluginPath(pluginPath));
     SysFreeString(pluginPath);
     if (failed)
         return -1;