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

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

Issue 1412733017: Tests comparing original-vs-saved multi-frame pages. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Using the right test file extension for html-only save-type. Created 5 years, 1 month 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 | « chrome/test/data/save_page/svg.svg ('k') | content/test/data/download/local-about-blank-subframes.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 8bffabbee5aa912bb45c7c7fa87037f2e261cfce..6ade20f9c7004c712f603c0a42c65d5c85694195 100644
--- a/content/browser/download/mhtml_generation_browsertest.cc
+++ b/content/browser/download/mhtml_generation_browsertest.cc
@@ -83,40 +83,6 @@ IN_PROC_BROWSER_TEST_F(MHTMLGenerationTest, GenerateMHTML) {
EXPECT_GT(file_size, 100); // Verify the actual file size.
}
-// This test verifies how MHTML serialization handles frames that have
-// the same URI (especially about:blank URI) but different content.
-// It should preserve contents of all the frames.
-IN_PROC_BROWSER_TEST_F(MHTMLGenerationTest, LocalAboutBlankSubframes) {
- base::FilePath path(temp_dir_.path());
- path = path.Append(FILE_PATH_LITERAL("test-local-about-blank-subframes.mht"));
-
- GenerateMHTML(path, embedded_test_server()->GetURL(
- "/download/local-about-blank-subframes.html"));
- ASSERT_FALSE(HasFailure());
-
- std::string mhtml;
- ASSERT_TRUE(base::ReadFileToString(path, &mhtml));
-
- // Make sure the contents of all frames are present.
- // 1. Check for contents (this is insufficient as it can also hit the contents
- // in the iframe.srcdoc attribute).
- EXPECT_THAT(mhtml, HasSubstr("main: acb0609d-eb10-4c26-83e2-ad8afb7b0ff3"));
- EXPECT_THAT(mhtml, HasSubstr("sub1: b124df3a-d39f-47a1-ae04-5bb5d0bf549e"));
- EXPECT_THAT(mhtml, HasSubstr("sub2: 07014068-604d-45ae-884f-a068cfe7bc0a"));
- EXPECT_THAT(mhtml, HasSubstr("sub3: 06cc8fcc-c692-4a1a-a10f-1645b746e8f4"));
- // 2. Count the number of text/html mhtml parts.
- int count = 0;
- size_t pos = 0;
- for (;;) {
- pos = mhtml.find("Content-Type: text/html", pos);
- if (pos == std::string::npos)
- break;
- count++;
- pos++;
- }
- EXPECT_EQ(4, count) << "Verify number of text/html parts in the mhtml output";
-}
-
IN_PROC_BROWSER_TEST_F(MHTMLGenerationTest, InvalidPath) {
base::FilePath path(FILE_PATH_LITERAL("/invalid/file/path"));
« no previous file with comments | « chrome/test/data/save_page/svg.svg ('k') | content/test/data/download/local-about-blank-subframes.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698