Skip to content

Commit

Permalink
WebCore:
Browse files Browse the repository at this point in the history
2009-03-03  Brady Eidson  <[email protected]>

        Reviewed by Darin Adler

        <rdar://problem/6616664> - Quick looks of various file types is broken

        In http://trac.webkit.org/changeset/40553 there was an attempt to prevent NSURLRequest churn
        for non-HTTP loads when the underlying ResourceRequest changed.  Unfortunately it was a little
        overzealous as the mainDocumentURL is relevant for all loads, not only HTTP/HTTPS loads.

        Partially reverted behavior to always set the mainDocumentURL in situations when we would've
        before that patch.

        * loader/FrameLoader.cpp:
        (WebCore::FrameLoader::addExtraFieldsToRequest):

        * platform/network/ResourceRequestBase.cpp:
        (WebCore::ResourceRequestBase::setMainDocumentURL):

WebKitTools:

2009-03-03  Brady Eidson  <[email protected]>

        Reviewed by Darin Adler

        Support layout test covering <rdar://problem/6616664>

        Change NSURLRequest/IWebURLRequest dumping to include the mainDocumentURL

        * DumpRenderTree/mac/ResourceLoadDelegate.mm:
        (-[NSURLRequest _drt_descriptionSuitableForTestResult]): Return both the request URL and the 
          mainDocumentURL.
        
        * DumpRenderTree/win/ResourceLoadDelegate.cpp:
        (descriptionSuitableForTestResult): Return both the request URL and the mainDocumentURL.

LayoutTests:

2009-03-03  Brady Eidson  <[email protected]>

        Reviewed by Darin Adler

        Layout test covering <rdar://problem/6616664> - Quick looks of various file types is broken

        Added to test the changes:
        * fast/loader/main-document-url-for-non-http-loads-expected.txt: Added.
        * fast/loader/main-document-url-for-non-http-loads.html: Added.
        * fast/loader/resources/subframe-notify-done.html: Added.

        Updated the following for the new info from dumpResourceLoadCallbacks():
        * http/tests/misc/window-dot-stop-expected.txt:
        * http/tests/xmlhttprequest/abort-should-cancel-load-expected.txt:
        * platform/mac-leopard/security/block-test-expected.txt:
        * platform/mac-tiger/http/tests/misc/willCacheResponse-delegate-callback-expected.txt:
        * platform/mac/http/tests/misc/willCacheResponse-delegate-callback-expected.txt:
        * platform/mac/webarchive/loading/cache-expired-subresource-expected.txt:
        * security/block-test-expected.txt:
        * webarchive/loading/test-loading-archive-expected.txt:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@41398 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
[email protected] committed Mar 3, 2009
1 parent bbb9b0b commit 341a3d8
Show file tree
Hide file tree
Showing 18 changed files with 243 additions and 144 deletions.
21 changes: 21 additions & 0 deletions LayoutTests/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
2009-03-03 Brady Eidson <[email protected]>

Reviewed by Darin Adler

Layout test covering <rdar://problem/6616664> - Quick looks of various file types is broken

Added to test the changes:
* fast/loader/main-document-url-for-non-http-loads-expected.txt: Added.
* fast/loader/main-document-url-for-non-http-loads.html: Added.
* fast/loader/resources/subframe-notify-done.html: Added.

Updated the following for the new info from dumpResourceLoadCallbacks():
* http/tests/misc/window-dot-stop-expected.txt:
* http/tests/xmlhttprequest/abort-should-cancel-load-expected.txt:
* platform/mac-leopard/security/block-test-expected.txt:
* platform/mac-tiger/http/tests/misc/willCacheResponse-delegate-callback-expected.txt:
* platform/mac/http/tests/misc/willCacheResponse-delegate-callback-expected.txt:
* platform/mac/webarchive/loading/cache-expired-subresource-expected.txt:
* security/block-test-expected.txt:
* webarchive/loading/test-loading-archive-expected.txt:

2009-03-02 Chris Marrin <[email protected]>

Reviewed by Sam Weinig.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
resources/subframe-notify-done.html - willSendRequest <NSURLRequest URL resources/subframe-notify-done.html, main document URL main-document-url-for-non-http-loads.html> redirectResponse (null)
<unknown> - didFinishLoading
resources/subframe-notify-done.html - didReceiveResponse <NSURLResponse resources/subframe-notify-done.html>
Radar 6616664 - Non-HTTP/HTTPS loads need to have their main document URL set.
When run in DumpRenderTree, this test will dump the resource load callback for the following subframe to make sure it had its main document URL set in its NSURLRequest.

17 changes: 17 additions & 0 deletions LayoutTests/fast/loader/main-document-url-for-non-http-loads.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<html>
<head>
<script>

if (window.layoutTestController) {
layoutTestController.dumpResourceLoadCallbacks();
layoutTestController.dumpAsText();
layoutTestController.waitUntilDone();
}

</script>
<body>
Radar 6616664 - Non-HTTP/HTTPS loads need to have their main document URL set.<br>
When run in DumpRenderTree, this test will dump the resource load callback for the following subframe to make sure it had its main document URL set in its NSURLRequest.<br>
<iframe src="resources/subframe-notify-done.html"></iframe>
</body>
</html>
14 changes: 14 additions & 0 deletions LayoutTests/fast/loader/resources/subframe-notify-done.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<html>
<head>
<script>
function loaded() {
if (window.layoutTestController) {
layoutTestController.notifyDone();
}
}
</script>
</head>
<body onload="loaded();">
I am a simple document that calls notifyDone() when loaded
</body>
</html>
2 changes: 1 addition & 1 deletion LayoutTests/http/tests/misc/window-dot-stop-expected.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
http://127.0.0.1:8000/incremental/slow-utf8-text.pl - willSendRequest <NSURLRequest http://127.0.0.1:8000/incremental/slow-utf8-text.pl> redirectResponse (null)
http://127.0.0.1:8000/incremental/slow-utf8-text.pl - willSendRequest <NSURLRequest URL http://127.0.0.1:8000/incremental/slow-utf8-text.pl, main document URL http://127.0.0.1:8000/misc/window-dot-stop.html> redirectResponse (null)
http://127.0.0.1:8000/incremental/slow-utf8-text.pl - didFailLoadingWithError: <NSError domain NSURLErrorDomain, code -999, failing URL "http://127.0.0.1:8000/incremental/slow-utf8-text.pl">
<unknown> - didFailLoadingWithError: <NSError domain NSURLErrorDomain, code -999, failing URL "http://127.0.0.1:8000/misc/window-dot-stop.html">
This tests for the successful use of window.stop()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
http://127.0.0.1:8000/xmlhttprequest/resources/endlessxml.php - willSendRequest <NSURLRequest http://127.0.0.1:8000/xmlhttprequest/resources/endlessxml.php> redirectResponse (null)
http://127.0.0.1:8000/xmlhttprequest/resources/endlessxml.php - willSendRequest <NSURLRequest URL http://127.0.0.1:8000/xmlhttprequest/resources/endlessxml.php, main document URL http://127.0.0.1:8000/xmlhttprequest/abort-should-cancel-load.html> redirectResponse (null)
http://127.0.0.1:8000/xmlhttprequest/resources/endlessxml.php - didFailLoadingWithError: <NSError domain NSURLErrorDomain, code -999, failing URL "http://127.0.0.1:8000/xmlhttprequest/resources/endlessxml.php">
This tests that calling abort() on an XHR object stops the load, causing the relevant resource load delegates to be sent.

124 changes: 62 additions & 62 deletions LayoutTests/platform/mac-leopard/security/block-test-expected.txt

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
http://127.0.0.1:8000/misc/resources/willCacheResponse-success.html - willSendRequest <NSURLRequest http://127.0.0.1:8000/misc/resources/willCacheResponse-success.html> redirectResponse (null)
http://127.0.0.1:8000/misc/resources/willCacheResponse-success.html - willSendRequest <NSURLRequest URL http://127.0.0.1:8000/misc/resources/willCacheResponse-success.html, main document URL http://127.0.0.1:8000/misc/willCacheResponse-delegate-callback.html> redirectResponse (null)
http://127.0.0.1:8000/misc/resources/willCacheResponse-success.html - didReceiveResponse <NSURLResponse http://127.0.0.1:8000/misc/resources/willCacheResponse-success.html>
http://127.0.0.1:8000/misc/resources/willCacheResponse-success.html - willCacheResponse: called
This tests for the willCacheResponse resource delegate callback as added for radar 5008925.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
http://127.0.0.1:8000/misc/resources/willCacheResponse-success.html - willSendRequest <NSURLRequest http://127.0.0.1:8000/misc/resources/willCacheResponse-success.html> redirectResponse (null)
http://127.0.0.1:8000/misc/resources/willCacheResponse-success.html - willSendRequest <NSURLRequest URL http://127.0.0.1:8000/misc/resources/willCacheResponse-success.html, main document URL http://127.0.0.1:8000/misc/willCacheResponse-delegate-callback.html> redirectResponse (null)
http://127.0.0.1:8000/misc/resources/willCacheResponse-success.html - willCacheResponse: called
http://127.0.0.1:8000/misc/resources/willCacheResponse-success.html - didReceiveResponse <NSURLResponse http://127.0.0.1:8000/misc/resources/willCacheResponse-success.html>
This tests for the willCacheResponse resource delegate callback as added for radar 5008925.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
main frame - didStartProvisionalLoadForFrame
main frame - didCommitLoadForFrame
frame "<!--framePath //<!--frame0-->-->" - didStartProvisionalLoadForFrame
resources/cache-expired-subresource.webarchive - willSendRequest <NSURLRequest resources/cache-expired-subresource.webarchive> redirectResponse (null)
resources/cache-expired-subresource.webarchive - willSendRequest <NSURLRequest URL resources/cache-expired-subresource.webarchive, main document URL cache-expired-subresource.html> redirectResponse (null)
main frame - didFinishDocumentLoadForFrame
<unknown> - didFinishLoading
resources/cache-expired-subresource.webarchive - didReceiveResponse <NSURLResponse resources/cache-expired-subresource.webarchive>
frame "<!--framePath //<!--frame0-->-->" - didCommitLoadForFrame
http://localhost/pink-bullet.png - willSendRequest <NSURLRequest http://localhost/pink-bullet.png> redirectResponse (null)
http://localhost/pink-bullet.png - willSendRequest <NSURLRequest URL http://localhost/pink-bullet.png, main document URL cache-expired-subresource.html> redirectResponse (null)
frame "<!--framePath //<!--frame0-->-->" - didFinishDocumentLoadForFrame
resources/cache-expired-subresource.webarchive - didFinishLoading
http://localhost/pink-bullet.png - didReceiveResponse <NSURLResponse http://localhost/test.php>
Expand Down
Loading

0 comments on commit 341a3d8

Please sign in to comment.