REGRESSION: Assertion failure in FrameLoader::continueLoadAfterWillSubmitForm() when
authorjberlin@webkit.org <jberlin@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 17 Jan 2011 20:22:17 +0000 (20:22 +0000)
committerjberlin@webkit.org <jberlin@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 17 Jan 2011 20:22:17 +0000 (20:22 +0000)
commitd617a3b2bf2ea1c52e030d5ee4f0eaaa972124ce
tree1b5b21435e8c53f8a815ad28ea32f3cf415099f3
parentd423cf51e770bfc84d862a430f045c421640d6a3
REGRESSION: Assertion failure in FrameLoader::continueLoadAfterWillSubmitForm() when
navigating back to an unreachable URL
https://bugs.webkit.org/show_bug.cgi?id=52388

Reviewed by Anders Carlsson.

Source/WebCore:

Test: http/tests/navigation/go-back-to-error-page.html

* history/PageCache.cpp:
(WebCore::PageCache::canCachePageContainingThisFrame):
Do not cache any error pages (which we can recognize as having substitute data and/or an
unreachableURL).

Tools:

Add a third parameter (unreachableURL) to queueLoadHTMLString.

* DumpRenderTree/LayoutTestController.cpp:
(queueLoadHTMLStringCallback):
(LayoutTestController::queueLoadHTMLString):
(LayoutTestController::queueLoadAlternateHTMLString):
* DumpRenderTree/LayoutTestController.h:

* DumpRenderTree/WorkQueueItem.h:
(LoadHTMLStringItem::LoadHTMLStringItem):

* DumpRenderTree/chromium/LayoutTestController.cpp:
(WorkItemLoadHTMLString::WorkItemLoadHTMLString):
(WorkItemLoadHTMLString::run):
(LayoutTestController::queueLoadHTMLString):

* DumpRenderTree/gtk/WorkQueueItemGtk.cpp:
(LoadHTMLStringItem::invoke):
* DumpRenderTree/mac/WorkQueueItemMac.mm:
(LoadHTMLStringItem::invoke):
* DumpRenderTree/win/WorkQueueItemWin.cpp:
(LoadHTMLStringItem::invoke):

LayoutTests:

Add a test that loads an alternate HTML String for an "unreachable" URL, loads another
page, and then goes back to the "unreachable" URL, which is now reachable.

This tests two things:
1) No assertion failure when going back to an unreachable URL.
2) There is no page cached for the unreachable URL.

* http/tests/navigation/go-back-to-error-page-expected.txt: Added.
* http/tests/navigation/go-back-to-error-page.html: Added.
* http/tests/navigation/resources/page-to-go-back-from.html: Added.
* http/tests/navigation/resources/page-treated-as-unreachable.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75966 268f45cc-cd09-0410-ab3c-d52691b4dbfc
15 files changed:
LayoutTests/ChangeLog
LayoutTests/http/tests/navigation/go-back-to-error-page-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/navigation/go-back-to-error-page.html [new file with mode: 0644]
LayoutTests/http/tests/navigation/resources/page-to-go-back-from.html [new file with mode: 0644]
LayoutTests/http/tests/navigation/resources/page-treated-as-unreachable.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/history/PageCache.cpp
Tools/ChangeLog
Tools/DumpRenderTree/LayoutTestController.cpp
Tools/DumpRenderTree/LayoutTestController.h
Tools/DumpRenderTree/WorkQueueItem.h
Tools/DumpRenderTree/chromium/LayoutTestController.cpp
Tools/DumpRenderTree/gtk/WorkQueueItemGtk.cpp
Tools/DumpRenderTree/mac/WorkQueueItemMac.mm
Tools/DumpRenderTree/win/WorkQueueItemWin.cpp