Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(145)

Side by Side Diff: chrome/browser/download/save_page_browsertest.cc

Issue 1417323006: OOPIFs: Deduplicating MHTML parts across frames. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mhtml-serialization-per-frame
Patch Set: Rebasing... Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | content/browser/download/mhtml_generation_manager.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <stddef.h> 5 #include <stddef.h>
6 #include <stdint.h> 6 #include <stdint.h>
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 890 matching lines...) Expand 10 before | Expand all | Expand 10 after
901 // to twice - from iframes.htm and from b.htm). 901 // to twice - from iframes.htm and from b.htm).
902 int count = 0; 902 int count = 0;
903 size_t pos = 0; 903 size_t pos = 0;
904 for (;;) { 904 for (;;) {
905 pos = mhtml.find("Content-Type: image/png", pos); 905 pos = mhtml.find("Content-Type: image/png", pos);
906 if (pos == std::string::npos) 906 if (pos == std::string::npos)
907 break; 907 break;
908 count++; 908 count++;
909 pos++; 909 pos++;
910 } 910 }
911 // TODO(lukasza): Need to dedupe savable resources (i.e. 1.png) across frames. 911 EXPECT_EQ(1, count) << "Verify number of image/png parts in the mhtml output";
912 // This will be fixed by crrev.com/1417323006.
913 // EXPECT_EQ(1, count)
914 // << "Verify number of image/png parts in the mhtml output";
915 } 912 }
916 913
917 // Test suite that verifies that the frame tree "looks" the same before 914 // Test suite that verifies that the frame tree "looks" the same before
918 // and after a save-page-as. 915 // and after a save-page-as.
919 class SavePageMultiFrameBrowserTest 916 class SavePageMultiFrameBrowserTest
920 : public SavePageSitePerProcessBrowserTest, 917 : public SavePageSitePerProcessBrowserTest,
921 public ::testing::WithParamInterface<content::SavePageType> { 918 public ::testing::WithParamInterface<content::SavePageType> {
922 protected: 919 protected:
923 void TestMultiFramePage(content::SavePageType save_page_type, 920 void TestMultiFramePage(content::SavePageType save_page_type,
924 const GURL& url, 921 const GURL& url,
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
1192 TestMultiFramePage(save_page_type, url, 6, expected_substrings); 1189 TestMultiFramePage(save_page_type, url, 6, expected_substrings);
1193 } 1190 }
1194 1191
1195 INSTANTIATE_TEST_CASE_P( 1192 INSTANTIATE_TEST_CASE_P(
1196 SaveType, 1193 SaveType,
1197 SavePageMultiFrameBrowserTest, 1194 SavePageMultiFrameBrowserTest,
1198 ::testing::Values(content::SAVE_PAGE_TYPE_AS_COMPLETE_HTML, 1195 ::testing::Values(content::SAVE_PAGE_TYPE_AS_COMPLETE_HTML,
1199 content::SAVE_PAGE_TYPE_AS_MHTML)); 1196 content::SAVE_PAGE_TYPE_AS_MHTML));
1200 1197
1201 } // namespace 1198 } // namespace
OLDNEW
« no previous file with comments | « no previous file | content/browser/download/mhtml_generation_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698