LayoutTests:
authorddkilzer <ddkilzer@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 7 Mar 2007 15:01:10 +0000 (15:01 +0000)
committerddkilzer <ddkilzer@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 7 Mar 2007 15:01:10 +0000 (15:01 +0000)
commit64316da5c30e454c15afdde732c88774b70c4e4a
tree0eb415ce37d95e241320287938345ed158018cd8
parentb295a67df405be8098f311032127d908a350636e
LayoutTests:

        Reviewed by Darin.

        - LayoutTests part of fix for http://bugs.webkit.org/show_bug.cgi?id=12463
          WebArchiver - attempt to insert nil exception when archive empty iframe

        Tests using both dumpDOMAsWebArchive() and dumpSourceAsWebArchive() were added
        for this bug since a similar fix was suggested for the DOM case which was not
        needed.  The remaining changes are related to renaming dumpAsWebArchive() to
        dumpDOMAsWebArchive().

        * webarchive/archive-empty-frame-dom-expected.txt: Added.
        * webarchive/archive-empty-frame-dom.html: Added.
        * webarchive/archive-empty-frame-source-expected.txt: Added.
        * webarchive/archive-empty-frame-source.html: Added.
        * webarchive/resources/dump-webarchive.js: Renamed dumpAsWebArchive() to dumpDOMAsWebArchive().
        * webarchive/test-body-background-expected.txt: Ditto.
        * webarchive/test-body-background.html: Ditto.
        * webarchive/test-duplicate-resources-expected.txt: Ditto.
        * webarchive/test-frameset-expected.txt: Ditto.
        * webarchive/test-frameset.html: Ditto.
        * webarchive/test-img-src-expected.txt: Ditto.
        * webarchive/test-img-src.html: Ditto.
        * webarchive/test-input-src-expected.txt: Ditto.
        * webarchive/test-input-src.html: Ditto.
        * webarchive/test-link-href-expected.txt: Ditto.
        * webarchive/test-link-href.html: Ditto.
        * webarchive/test-object-data-expected.txt: Ditto.
        * webarchive/test-object-data.html: Ditto.
        * webarchive/test-script-src-expected.txt: Ditto.
        * webarchive/test-table-background-expected.txt: Ditto.
        * webarchive/test-table-background.html: Ditto.
        * webarchive/test-td-background-expected.txt: Ditto.
        * webarchive/test-td-background.html: Ditto.

WebKit:

        Reviewed by Darin.

        - WebCore part of fix for http://bugs.webkit.org/show_bug.cgi?id=12463
          WebArchiver - attempt to insert nil exception when archive empty iframe

        When dealing with an iframe element with no src attribute, the element contains
        a src attribute in the DOM with a URL of "about:blank" and some HTML to implement
        the blank page.  In the original page source, however, the iframe element does
        not include a src attribute, which caused a nil archive to be returned for the
        childFrameArchive and thus caused the bug.  The fix is a simple nil check.

        Test: webarchive/archive-empty-frame-source.html

        * WebView/WebArchiver.mm:
        (+ (NSArray *)_subframeArchivesForFrame:(WebFrame *)frame): Don't add childFrameArchive
        to the subframeArchives array if it is nil.

WebKitTools:

        Reviewed by Darin.

        - WebKitTools part of fix for http://bugs.webkit.org/show_bug.cgi?id=12463
          WebArchiver - attempt to insert nil exception when archive empty iframe

        The dumpDOMAsWebArchive() test method uses the DOMDocument as a basis for creating
        a webarchive while the dumpSourceAsWebArchive() test method uses the original
        dataSource (page source) to create a webarchive.  Most tests currently use
        dumpDOMAsWebArchive() since this is what Safari does when saving a web page as a
        webarchive.

        * DumpRenderTree/DumpRenderTree.m: Renamed dumpAsWebArchive to dumpDOMAsWebArchive.
        Added dumpSourceAsWebArchive.
        (dump):
        (+[LayoutTestController isSelectorExcludedFromWebScript:]):
        (-[LayoutTestController dumpDOMAsWebArchive]):
        (-[LayoutTestController dumpSourceAsWebArchive]):
        (runTest):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@20018 268f45cc-cd09-0410-ab3c-d52691b4dbfc
28 files changed:
LayoutTests/ChangeLog
LayoutTests/webarchive/archive-empty-frame-dom-expected.txt [new file with mode: 0644]
LayoutTests/webarchive/archive-empty-frame-dom.html [new file with mode: 0644]
LayoutTests/webarchive/archive-empty-frame-source-expected.txt [new file with mode: 0644]
LayoutTests/webarchive/archive-empty-frame-source.html [new file with mode: 0644]
LayoutTests/webarchive/resources/dump-webarchive.js
LayoutTests/webarchive/test-body-background-expected.txt
LayoutTests/webarchive/test-body-background.html
LayoutTests/webarchive/test-duplicate-resources-expected.txt
LayoutTests/webarchive/test-frameset-expected.txt
LayoutTests/webarchive/test-frameset.html
LayoutTests/webarchive/test-img-src-expected.txt
LayoutTests/webarchive/test-img-src.html
LayoutTests/webarchive/test-input-src-expected.txt
LayoutTests/webarchive/test-input-src.html
LayoutTests/webarchive/test-link-href-expected.txt
LayoutTests/webarchive/test-link-href.html
LayoutTests/webarchive/test-object-data-expected.txt
LayoutTests/webarchive/test-object-data.html
LayoutTests/webarchive/test-script-src-expected.txt
LayoutTests/webarchive/test-table-background-expected.txt
LayoutTests/webarchive/test-table-background.html
LayoutTests/webarchive/test-td-background-expected.txt
LayoutTests/webarchive/test-td-background.html
WebKit/ChangeLog
WebKit/WebView/WebArchiver.mm
WebKitTools/ChangeLog
WebKitTools/DumpRenderTree/DumpRenderTree.m