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

Unified Diff: content/browser/download/mhtml_generation_browsertest.cc

Issue 2656713002: Merge to M57: Remove popup overlay from MHTML when requested (Closed)
Patch Set: Created 3 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/download/mhtml_generation_browsertest.cc
diff --git a/content/browser/download/mhtml_generation_browsertest.cc b/content/browser/download/mhtml_generation_browsertest.cc
index 4486c2569c364618bfce3fd02d304c7852208959..6adf1212067e82662735802eb6ae34847e5b2cad 100644
--- a/content/browser/download/mhtml_generation_browsertest.cc
+++ b/content/browser/download/mhtml_generation_browsertest.cc
@@ -649,4 +649,27 @@ IN_PROC_BROWSER_TEST_F(MHTMLGenerationSitePerProcessTest, GenerateMHTML) {
EXPECT_THAT(mhtml, ContainsRegex("Content-Location:.*/title1.html"));
}
+IN_PROC_BROWSER_TEST_F(MHTMLGenerationTest, RemovePopupOverlay) {
+ base::FilePath path(temp_dir_.GetPath());
+ path = path.Append(FILE_PATH_LITERAL("test.mht"));
+
+ GURL url(embedded_test_server()->GetURL("/popup.html"));
+
+ MHTMLGenerationParams params(path);
+ params.remove_popup_overlay = true;
+
+ GenerateMHTML(params, url);
+ ASSERT_FALSE(HasFailure());
+
+ std::string mhtml;
+ {
+ base::ThreadRestrictions::ScopedAllowIO allow_io_for_content_verification;
+ ASSERT_TRUE(base::ReadFileToString(path, &mhtml));
+ }
+
+ // Make sure the overlay is removed.
+ EXPECT_THAT(mhtml, Not(HasSubstr("class=3D\"overlay")));
+ EXPECT_THAT(mhtml, Not(HasSubstr("class=3D\"modal")));
+}
+
} // namespace content
« no previous file with comments | « components/offline_pages/core/offline_page_test_archiver.cc ('k') | content/browser/download/mhtml_generation_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698