diff options
author | lukasza <lukasza@chromium.org> | 2016-01-25 15:55:47 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-01-25 23:58:52 +0000 |
commit | 777a7dd63a55b297f0c9543f1892cecb54505a1f (patch) | |
tree | a0b9f7ac460c61983feb2eefaffe1f3a80272ad5 /chrome/browser/download | |
parent | a0ce3e09b083dcc6bdee379ab4a38fc479bc09e6 (diff) | |
download | chromium_src-777a7dd63a55b297f0c9543f1892cecb54505a1f.zip chromium_src-777a7dd63a55b297f0c9543f1892cecb54505a1f.tar.gz chromium_src-777a7dd63a55b297f0c9543f1892cecb54505a1f.tar.bz2 |
Save-Page-As-Complete-Html: Each frame links to a distinct local file.
Previous CL (crrev.com/1484093002) made it possible to save contents of
all frames - even if some of them have the same URI, they still get
saved into separate files / SaveItems. This CL makes sure that we
rewrite links in a html document, based on frame identity if possible
(rather than always doing the rewriting based on the uri):
- SaveItem now stores a frame_tree_node_id that can be potentially used
(if the SaveItem is for a frame rather than for a savable resource) as
a key in the map into the local paths.
- WebFrameSerializerImpl now rewrites link uris based on 2 maps
(url -> local path map as well as frame -> local path map).
BUG=106364, 106158, 538188
Review URL: https://codereview.chromium.org/1502563004
Cr-Commit-Position: refs/heads/master@{#371349}
Diffstat (limited to 'chrome/browser/download')
-rw-r--r-- | chrome/browser/download/save_page_browsertest.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/chrome/browser/download/save_page_browsertest.cc b/chrome/browser/download/save_page_browsertest.cc index 868b35b..8518f63 100644 --- a/chrome/browser/download/save_page_browsertest.cc +++ b/chrome/browser/download/save_page_browsertest.cc @@ -1120,15 +1120,17 @@ IN_PROC_BROWSER_TEST_P(SavePageMultiFrameBrowserTest, RuntimeChanges) { std::vector<std::string> expected_substrings(std::begin(arr), std::end(arr)); if (save_page_type == content::SAVE_PAGE_TYPE_AS_COMPLETE_HTML) { - // TODO(lukasza): crbug.com/106364: Expand complete-html test beyond just - // being a crash test. In particular, the |complete_html_arr| below should - // be the same as the |arr| above (and at this point the special-casing of + // TODO(lukasza): crbug.com/106364: Expand complete-html test to cover all + // test frames. In particular, the |complete_html_arr| below should be the + // same as the |arr| above (and at this point the special-casing of // complete-html can be removed). // Draft CLs with fix proposals that should accomplish this: // - crrev.com/1502563004 // - crrev.com/1500103002 std::string complete_html_arr[] = { "frames-runtime-changes.htm: 4388232f-8d45-4d2e-9807-721b381be153", + "subframe1: 21595339-61fc-4854-b6df-0668328ea263", + "subframe2: adf55719-15e7-45be-9eda-d12fe782a1bd", }; expected_substrings = std::vector<std::string>( std::begin(complete_html_arr), std::end(complete_html_arr)); |