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 6adf1212067e82662735802eb6ae34847e5b2cad..8d490a1b96e488fabc62b59b0001d024180de832 100644 |
--- a/content/browser/download/mhtml_generation_browsertest.cc |
+++ b/content/browser/download/mhtml_generation_browsertest.cc |
@@ -672,4 +672,30 @@ IN_PROC_BROWSER_TEST_F(MHTMLGenerationTest, RemovePopupOverlay) { |
EXPECT_THAT(mhtml, Not(HasSubstr("class=3D\"modal"))); |
} |
+IN_PROC_BROWSER_TEST_F(MHTMLGenerationSitePerProcessTest, |
+ GenerateMHTMLWithExtraData) { |
+ const char kFakeSignalData = "FakeSignalData"; |
+ base::FilePath path(temp_dir_.GetPath()); |
+ path = path.Append(FILE_PATH_LITERAL("test.mht")); |
+ |
+ GURL url(embedded_test_server()->GetURL("/page_with_image.html")); |
+ |
+ MHTMLGenerationParams params(path); |
+ params.remove_popup_overlay = true; |
+ params.extra_data = kFakeSignalData; |
+ |
+ 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 that extra data made it into the mhtml. |
+ EXPECT_THAT(mhtml, HasSubstr(kFakeSignalData)); |
+} |
+ |
+ |
} // namespace content |