Commit 2aa1491b authored by japhet@chromium.org's avatar japhet@chromium.org
Browse files

2011-01-20 Nate Chapin <japhet@chromium.org>

        Reviewed by Adam Barth.

        Test for https://bugs.webkit.org/show_bug.cgi?id=52769.

        * fast/dom/Window/Location/resources/set-location-after-close-new-window.html: Added.
        * fast/dom/Window/Location/set-location-after-close-expected.txt: Added.
        * fast/dom/Window/Location/set-location-after-close.html: Added.
2011-01-20  Nate Chapin  <japhet@chromium.org>

        Reviewed by Adam Barth.

        Null-check m_frame in DOMWindow::setLocation(), since it's
        possible to reach this point without it having been checked
        already.
        https://bugs.webkit.org/show_bug.cgi?id=52769

        Test: fast/dom/Window/Location/set-location-after-close.html

        * page/DOMWindow.cpp:
        (WebCore::DOMWindow::setLocation):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76303 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 89140b20
2011-01-20 Nate Chapin <japhet@chromium.org>
Reviewed by Adam Barth.
Test for https://bugs.webkit.org/show_bug.cgi?id=52769.
* fast/dom/Window/Location/resources/set-location-after-close-new-window.html: Added.
* fast/dom/Window/Location/set-location-after-close-expected.txt: Added.
* fast/dom/Window/Location/set-location-after-close.html: Added.
2011-01-20 Chang Shu <chang.shu@nokia.com>
 
Reviewed by Darin Adler.
......
<html>
<body onunload="opener.postMessage('closed', '*');">
<script>
opener.postMessage("opened", "*");
</script>
</body>
</html>
main frame - has 1 onunload handler(s)
This tests opens a new window, sets a timeout to close it, then sets a timeout to navigate it via window.location. We pass if we don't crash when setting the location of the already closed window.
<html>
<body>
This tests opens a new window, sets a timeout to close it, then sets a timeout to navigate it via window.location.
We pass if we don't crash when setting the location of the already closed window.
<script>
if (window.layoutTestController) {
layoutTestController.dumpAsText();
layoutTestController.setCanOpenWindows();
layoutTestController.waitUntilDone();
}
var w = window.open('resources/set-location-after-close-new-window.html');
window.addEventListener("message", processMessage, false);
function processMessage(event) {
if (event.data == "opened")
w.close();
else if (event.data == "closed") {
w.location = '';
if (window.layoutTestController)
layoutTestController.notifyDone();
}
}
</script>
</body>
</html>
2011-01-20 Nate Chapin <japhet@chromium.org>
Reviewed by Adam Barth.
Null-check m_frame in DOMWindow::setLocation(), since it's
possible to reach this point without it having been checked
already.
https://bugs.webkit.org/show_bug.cgi?id=52769
Test: fast/dom/Window/Location/set-location-after-close.html
* page/DOMWindow.cpp:
(WebCore::DOMWindow::setLocation):
2011-01-20 Chang Shu <chang.shu@nokia.com>
 
Reviewed by Darin Adler.
......@@ -1617,6 +1617,9 @@ EventTargetData* DOMWindow::ensureEventTargetData()
void DOMWindow::setLocation(const String& urlString, DOMWindow* activeWindow, DOMWindow* firstWindow, SetLocationLocking locking)
{
if (!m_frame)
return;
Frame* activeFrame = activeWindow->frame();
if (!activeFrame)
return;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment