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

Unified Diff: chrome/browser/download/save_page_browsertest.cc

Issue 1386873003: OOPIFs: Transitioning MHTML generation from view-oriented to frame-oriented. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mhtml-generation-mgr-cleanup
Patch Set: Moving "using" declaration under a singly-included section of frame_messges.h Created 5 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/browser/download/mhtml_generation_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/download/save_page_browsertest.cc
diff --git a/chrome/browser/download/save_page_browsertest.cc b/chrome/browser/download/save_page_browsertest.cc
index 72366612c173109da2167c617b61a00480823597..df49526945150b24b4fb49e0405ce9ca282700ba 100644
--- a/chrome/browser/download/save_page_browsertest.cc
+++ b/chrome/browser/download/save_page_browsertest.cc
@@ -15,7 +15,7 @@
#include "base/prefs/pref_member.h"
#include "base/prefs/pref_service.h"
#include "base/run_loop.h"
-#include "base/strings/string_split.h"
+#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "base/test/test_file_util.h"
#include "chrome/app/chrome_command_ids.h"
@@ -75,11 +75,7 @@ std::string ReadFileAndCollapseWhitespace(const base::FilePath& file_path) {
return std::string();
}
- std::vector<std::string> words =
- base::SplitString(file_contents, " \t\r\n", base::TRIM_WHITESPACE,
- base::SPLIT_WANT_NONEMPTY);
-
- return base::JoinString(words, " ");
+ return base::CollapseWhitespaceASCII(file_contents, false);
}
// Waits for an item record in the downloads database to match |filter|. See
@@ -865,10 +861,7 @@ IN_PROC_BROWSER_TEST_F(SavePageSitePerProcessBrowserTest, SaveAsCompleteHtml) {
}
// Test for crbug.com/538766.
-// Disabled because the test will fail until the bug is fixed
-// (but note that the test only fails with --site-per-process flag).
-IN_PROC_BROWSER_TEST_F(SavePageSitePerProcessBrowserTest,
- DISABLED_SaveAsMHTML) {
+IN_PROC_BROWSER_TEST_F(SavePageSitePerProcessBrowserTest, SaveAsMHTML) {
GURL url(
embedded_test_server()->GetURL("a.com", "/save_page/frames-xsite.htm"));
ui_test_utils::NavigateToURL(browser(), url);
@@ -911,7 +904,10 @@ IN_PROC_BROWSER_TEST_F(SavePageSitePerProcessBrowserTest,
count++;
pos++;
}
- EXPECT_EQ(1, count) << "Verify number of image/png parts in the mhtml output";
+ // TODO(lukasza): Need to dedupe savable resources (i.e. 1.png) across frames.
+ // This will be fixed by crrev.com/1417323006.
+ // EXPECT_EQ(1, count)
+ // << "Verify number of image/png parts in the mhtml output";
}
// Test suite that verifies that the frame tree "looks" the same before
@@ -1023,10 +1019,6 @@ IN_PROC_BROWSER_TEST_P(SavePageMultiFrameBrowserTest, CrossSite) {
GURL url(
embedded_test_server()->GetURL("a.com", "/save_page/frames-xsite.htm"));
- // TODO(lukasza): crbug.com/538766: Enable CrossSite testing of MHTML.
- if (save_page_type == content::SAVE_PAGE_TYPE_AS_MHTML)
- return;
-
// TODO(lukasza/paulmeyer): crbug.com/457440: Can enable verification
// of the original page once find-in-page works for OOP frames.
bool skip_verification_of_original_page = true;
« 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