Skip to content

Commit

Permalink
LayoutTests:
Browse files Browse the repository at this point in the history
        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: http://svn.webkit.org/repository/webkit/trunk@15970 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
ggaren committed Aug 22, 2006
1 parent 1303935 commit 509e0a2
Show file tree
Hide file tree
Showing 108 changed files with 5,545 additions and 20 deletions.
119 changes: 119 additions & 0 deletions LayoutTests/ChangeLog
@@ -1,3 +1,122 @@
2006-08-22 Trey Matteson <trey@usa.net>

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.

2006-08-22 Rob Buis <buis@kde.org>

Reviewed by Eric.
Expand Down
112 changes: 112 additions & 0 deletions LayoutTests/http/tests/navigation/anchor-basic-expected.txt
@@ -0,0 +1,112 @@
layer at (0,0) size 785x1550
RenderView at (0,0) size 785x600
layer at (0,0) size 785x1550
RenderBlock {HTML} at (0,0) size 785x1550
RenderBody {BODY} at (8,8) size 769x1510
RenderBlock (anonymous) at (0,0) size 769x259
RenderText {#text} at (0,0) size 749x185
text run at (0,0) width 676: "This is test page that we navigate to as part of testing"
text run at (0,37) width 333: "various navigation styles. "
text run at (333,37) width 416: "It includes a form so that we can"
text run at (0,74) width 717: "test saving and restoring of form data, and it needs to be"
text run at (0,111) width 745: "long enough that we can test saving and restoring of scroll"
text run at (0,148) width 119: "position. "
RenderBR {BR} at (119,177) size 0x0
RenderBR {BR} at (0,185) size 0x37
RenderBR {BR} at (0,222) size 0x37
RenderBlock {HR} at (0,275) size 769x2 [border: (1px inset #000000)]
RenderBlock {FORM} at (0,293) size 769x424
RenderButton {INPUT} at (2,2) size 111x18 [bgcolor=#C0C0C0]
RenderBlock (anonymous) at (8,2) size 95x13
RenderText at (0,0) size 95x13
text run at (0,0) width 95: "Submit with POST"
RenderBR {BR} at (115,15) size 0x0
RenderButton {INPUT} at (2,24) size 231x18 [bgcolor=#C0C0C0]
RenderBlock (anonymous) at (8,2) size 215x13
RenderText at (0,0) size 215x13
text run at (0,0) width 215: "Submit with POST followed by a redirect"
RenderBR {BR} at (235,37) size 0x0
RenderText {#text} at (0,44) size 376x37
text run at (0,44) width 376: "Here are some form elements"
RenderTextField {INPUT} at (378,59) size 148x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
RenderBR {BR} at (528,73) size 0x0
RenderText {#text} at (0,81) size 334x37
text run at (0,81) width 334: "that we can use for testing"
RenderTextField {INPUT} at (336,96) size 148x19 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
RenderBR {BR} at (486,110) size 0x0
RenderBlock {INPUT} at (3,136) size 12x13
RenderText {#text} at (18,118) size 73x37
text run at (18,118) width 73: " Male"
RenderBR {BR} at (91,147) size 0x0
RenderBlock {INPUT} at (3,173) size 12x13
RenderText {#text} at (18,155) size 102x37
text run at (18,155) width 102: " Female"
RenderBR {BR} at (120,184) size 0x0
RenderBlock {INPUT} at (3,211) size 12x12
RenderText {#text} at (18,192) size 130x37
text run at (18,192) width 130: " option #1"
RenderBR {BR} at (148,221) size 0x0
RenderBlock {INPUT} at (3,248) size 12x12
RenderText {#text} at (18,229) size 130x37
text run at (18,229) width 130: " option #2"
RenderBR {BR} at (148,258) size 0x0
RenderMenuList {SELECT} at (2,268) size 255x18
RenderBlock (anonymous) at (8,2) size 224x13
RenderText at (0,0) size 63x13
text run at (0,0) width 63: "Initial Value"
RenderBR {BR} at (259,281) size 0x0
RenderTextField {TEXTAREA} at (2,290) size 232x132 [bgcolor=#FFFFFF] [border: (1px solid #000000)]
RenderText {#text} at (0,0) size 0x0
RenderBlock {HR} at (0,749) size 769x2 [border: (1px inset #000000)]
RenderBlock {P} at (0,783) size 769x37
RenderText {#text} at (0,0) size 62x37
text run at (0,0) width 62: "Now"
RenderBlock {P} at (0,852) size 769x37
RenderText {#text} at (0,0) size 67x37
text run at (0,0) width 67: "some"
RenderBlock {P} at (0,921) size 769x37
RenderText {#text} at (0,0) size 63x37
text run at (0,0) width 63: "filler"
RenderBlock {P} at (0,990) size 769x37
RenderText {#text} at (0,0) size 28x37
text run at (0,0) width 28: "so"
RenderBlock {P} at (0,1059) size 769x37
RenderText {#text} at (0,0) size 39x37
text run at (0,0) width 39: "the"
RenderBlock {P} at (0,1128) size 769x37
RenderText {#text} at (0,0) size 46x37
text run at (0,0) width 46: "doc"
RenderBlock {P} at (0,1197) size 769x37
RenderText {#text} at (0,0) size 21x37
text run at (0,0) width 21: "is"
RenderBlock {P} at (0,1266) size 769x37
RenderText {#text} at (0,0) size 57x37
text run at (0,0) width 57: "long"
RenderBlock {P} at (0,1335) size 769x37
RenderText {#text} at (0,0) size 94x37
text run at (0,0) width 94: "enough"
RenderBlock {P} at (0,1404) size 769x37
RenderText {#text} at (0,0) size 112x37
text run at (0,0) width 112: "to scroll."
RenderBlock {P} at (0,1473) size 769x37
RenderInline {A} at (0,0) size 531x37
RenderText {#text} at (0,0) size 531x37
text run at (0,0) width 531: "This is an anchor point named \"anchor1\"."
layer at (389,363) size 142x13 scrollWidth 153
RenderBlock {DIV} at (3,3) size 142x13
RenderText {#text} at (1,0) size 151x13
text run at (1,0) width 151: "Initial text before user input"
layer at (347,400) size 142x13
RenderBlock {DIV} at (3,3) size 142x13
layer at (11,592) size 230x130
RenderBlock {DIV} at (1,1) size 230x130
RenderText {#text} at (3,0) size 185x13
text run at (3,0) width 185: "More initial text before user input."
text run at (188,0) width 0: " "
RenderBR {BR} at (3,13) size 0x13
scrolled to 0,950

============== Back Forward List ==============
http://127.0.0.1:8000/navigation/anchor-basic.html **nav target**
curr-> http://127.0.0.1:8000/navigation/resources/success200.html#anchor1 **nav target**
===============================================
6 changes: 6 additions & 0 deletions LayoutTests/http/tests/navigation/anchor-basic.html
@@ -0,0 +1,6 @@
<script type="text/javascript" src="resources/testcode.js"/>
<script>
runBasicTest("resources/success200.html#anchor1", "none");
</script>
This page just kicks off a test, and should not appear in the expected test output.
The files in the resources dir have comments about the tests.

0 comments on commit 509e0a2

Please sign in to comment.