| 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
|
|
|