LayoutTests:
Reviewed by ggaren.
Introducing a small test suite for bugs related to various navigation techniques,
e.g., back/forward, reload, various redirect flavors, POST, POST-then-redirect,
within-page anchors. Most of the tests are done with and without an enclosing frameset.
The tests verify the content of the final page (which may include restored form
state), scroll location (also sometimes restored), and the full content of the
back-forward list.
* fast/overflow/scrollRevealButton-expected.txt:
Updated to include scroll location that is now emitted.
* http/tests/navigation/anchor-basic-expected.txt: Added.
* http/tests/navigation/anchor-basic.html: Added.
* http/tests/navigation/anchor-frames-expected.txt: Added.
* http/tests/navigation/anchor-frames.html: Added.
* http/tests/navigation/anchor-goback-expected.txt: Added.
* http/tests/navigation/anchor-goback.html: Added.
* http/tests/navigation/anchor-subframeload-expected.txt: Added.
* http/tests/navigation/anchor-subframeload.html: Added.
* http/tests/navigation/error404-basic-expected.txt: Added.
* http/tests/navigation/error404-basic.html: Added.
* http/tests/navigation/error404-frames-expected.txt: Added.
* http/tests/navigation/error404-frames.html: Added.
* http/tests/navigation/error404-goback-expected.txt: Added.
* http/tests/navigation/error404-goback.html: Added.
* http/tests/navigation/error404-subframeload-expected.txt: Added.
* http/tests/navigation/error404-subframeload.html: Added.
* http/tests/navigation/javascriptlink-basic-expected.txt: Added.
* http/tests/navigation/javascriptlink-basic.html: Added.
* http/tests/navigation/javascriptlink-frames-expected.txt: Added.
* http/tests/navigation/javascriptlink-frames.html: Added.
* http/tests/navigation/javascriptlink-goback-expected.txt: Added.
* http/tests/navigation/javascriptlink-goback.html: Added.
* http/tests/navigation/javascriptlink-subframeload-expected.txt: Added.
* http/tests/navigation/javascriptlink-subframeload.html: Added.
* http/tests/navigation/metaredirect-basic-expected.txt: Added.
* http/tests/navigation/metaredirect-basic.html: Added.
* http/tests/navigation/metaredirect-frames-expected.txt: Added.
* http/tests/navigation/metaredirect-frames.html: Added.
* http/tests/navigation/metaredirect-goback-expected.txt: Added.
* http/tests/navigation/metaredirect-goback.html: Added.
* http/tests/navigation/metaredirect-subframeload-expected.txt: Added.
* http/tests/navigation/metaredirect-subframeload.html: Added.
* http/tests/navigation/post-basic-expected.txt: Added.
* http/tests/navigation/post-basic.html: Added.
* http/tests/navigation/post-frames-expected.txt: Added.
* http/tests/navigation/post-frames-goback1.html-disabled: Added.
* http/tests/navigation/post-frames.html: Added.
* http/tests/navigation/post-goback1-expected.txt: Added.
* http/tests/navigation/post-goback1.html: Added.
* http/tests/navigation/post-goback2-expected.txt: Added.
* http/tests/navigation/post-goback2.html: Added.
* http/tests/navigation/postredirect-basic-expected.txt: Added.
* http/tests/navigation/postredirect-basic.html: Added.
* http/tests/navigation/postredirect-frames-expected.txt: Added.
* http/tests/navigation/postredirect-frames-goback1.html-disabled: Added.
* http/tests/navigation/postredirect-frames.html: Added.
* http/tests/navigation/postredirect-goback1-expected.txt: Added.
* http/tests/navigation/postredirect-goback1.html: Added.
* http/tests/navigation/postredirect-goback2-expected.txt: Added.
* http/tests/navigation/postredirect-goback2.html: Added.
* http/tests/navigation/redirect302-basic-expected.txt: Added.
* http/tests/navigation/redirect302-basic.html: Added.
* http/tests/navigation/redirect302-frames-expected.txt: Added.
* http/tests/navigation/redirect302-frames.html: Added.
* http/tests/navigation/redirect302-goback-expected.txt: Added.
* http/tests/navigation/redirect302-goback.html: Added.
* http/tests/navigation/redirect302-subframeload-expected.txt: Added.
* http/tests/navigation/redirect302-subframeload.html: Added.
* http/tests/navigation/relativeanchor-basic-expected.txt: Added.
* http/tests/navigation/relativeanchor-basic.html: Added.
* http/tests/navigation/relativeanchor-frames-expected.txt: Added.
* http/tests/navigation/relativeanchor-frames.html: Added.
* http/tests/navigation/relativeanchor-goback-expected.txt: Added.
* http/tests/navigation/relativeanchor-goback.html: Added.
* http/tests/navigation/resources/error404.pl: Added.
* http/tests/navigation/resources/frameset.pl: Added.
* http/tests/navigation/resources/javascriptlink.html: Added.
* http/tests/navigation/resources/metaredirect.html: Added.
* http/tests/navigation/resources/otherpage.html: Added.
* http/tests/navigation/resources/postresult.pl: Added.
* http/tests/navigation/resources/redirect302.pl: Added.
* http/tests/navigation/resources/slowmetaredirect.html: Added.
* http/tests/navigation/resources/slowtimerredirect.html: Added.
* http/tests/navigation/resources/success200.html: Added.
* http/tests/navigation/resources/testcode.js: Added.
* http/tests/navigation/resources/timerredirect.html: Added.
* http/tests/navigation/slowmetaredirect-basic-expected.txt: Added.
* http/tests/navigation/slowmetaredirect-basic.html: Added.
* http/tests/navigation/slowtimerredirect-basic-expected.txt: Added.
* http/tests/navigation/slowtimerredirect-basic.html: Added.
* http/tests/navigation/success200-basic-expected.txt: Added.
* http/tests/navigation/success200-basic.html: Added.
* http/tests/navigation/success200-frames-expected.txt: Added.
* http/tests/navigation/success200-frames-goback.html-disabled: Added.
* http/tests/navigation/success200-frames-loadsame-expected.txt: Added.
* http/tests/navigation/success200-frames-loadsame.html: Added.
* http/tests/navigation/success200-frames-reload.html-disabled: Added.
* http/tests/navigation/success200-frames.html: Added.
* http/tests/navigation/success200-goback-expected.txt: Added.
* http/tests/navigation/success200-goback.html: Added.
* http/tests/navigation/success200-loadsame-expected.txt: Added.
* http/tests/navigation/success200-loadsame.html: Added.
* http/tests/navigation/success200-reload-expected.txt: Added.
* http/tests/navigation/success200-reload.html: Added.
* http/tests/navigation/success200-subframeload-expected.txt: Added.
* http/tests/navigation/success200-subframeload-goback.html-disabled: Added.
* http/tests/navigation/success200-subframeload.html: Added.
* http/tests/navigation/timerredirect-basic-expected.txt: Added.
* http/tests/navigation/timerredirect-basic.html: Added.
* http/tests/navigation/timerredirect-frames-expected.txt: Added.
* http/tests/navigation/timerredirect-frames.html: Added.
* http/tests/navigation/timerredirect-goback-expected.txt: Added.
* http/tests/navigation/timerredirect-goback.html: Added.
* http/tests/navigation/timerredirect-subframeload-expected.txt: Added.
* http/tests/navigation/timerredirect-subframeload.html: Added.
WebKitTools:
Reviewed by ggaren.
Added support for a new set of browser navigation tests. The main feature
is the ability for a test to queue up a set of future actions that will
happen after that first page is loaded. This is used to simulate a sequence
of user actions such as filling out forms, loading additional pages or
going back. In addition we can now dump out the state of the back/forward
list, and the scroll position is dumped if not at 0,0.
* DumpRenderTree/DumpRenderTree.m:
(main): Init new state
(compareHistoryItems): New utility to support sorting.
(dumpHistoryItem): Write out a WebHistoryItem and kids.
(dumpFrameScrollPosition): Write out the scroll position.
(dump): Optionally write b/f list or scroll position.
(-[WaitUntilDoneDelegate processWork:]): Perform queued work.
(-[WaitUntilDoneDelegate webView:locationChangeDone:forDataSource:]):
Kick off any queued actions. Fixed for the case of loads started in
a subframe instead of the root frame.
(-[WaitUntilDoneDelegate webView:didStartProvisionalLoadForFrame:]):
Grab the topmost frame that is being loaded. Do this as early as possible,
instead of in didCommitLoadForFrame.
(-[WaitUntilDoneDelegate webView:didCommitLoadForFrame:]):
Noting a load has started now happens in previous method.
(+[LayoutTestController isSelectorExcludedFromWebScript:]): Boilerplate
(+[LayoutTestController webScriptNameForSelector:]): Boilerplate
(-[LayoutTestController notifyDone]): readyToDump var is subsumed by
topFrameLoading
(-[LayoutTestController dumpBackForwardList]): New impl, just set a bit.
(-[LayoutTestController _addWorkForTarget:selector:arg1:arg2:]):
Add new work to the queue.
(-[LayoutTestController _doLoad:target:]): Do a queued load.
(-[LayoutTestController _doBackOrForwardNav:]): Do a queued back/forward.
(-[LayoutTestController scheduleBackNav:]): Ways for scripts to queue actions
(-[LayoutTestController scheduleForwardNav:]):
(-[LayoutTestController scheduleReload]):
(-[LayoutTestController scheduleScript:]):
(-[LayoutTestController scheduleLoad:target:]):
(runTest): Clear new state for each test. Renamed from "dumpRenderTree"
since it's not one of the functions that does any dumping.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15970
268f45cc-cd09-0410-ab3c-
d52691b4dbfc