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

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

Issue 1709293002: Add support for CSS unicod encoding to the text codec. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add a unit test Created 4 years, 8 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
« no previous file with comments | « no previous file | chrome/test/data/save_page/1.css » ('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 0c497e9d93967e1cbcad7abedddfb9b4ce26ab69..f25a5a5624031f72633d5087d0dade55624292c1 100644
--- a/chrome/browser/download/save_page_browsertest.cc
+++ b/chrome/browser/download/save_page_browsertest.cc
@@ -735,6 +735,11 @@ IN_PROC_BROWSER_TEST_F(SavePageAsMHTMLBrowserTest, SavePageAsMHTML) {
int64_t actual_file_size = -1;
EXPECT_TRUE(base::GetFileSize(full_file_name, &actual_file_size));
EXPECT_LE(kFileSizeMin, actual_file_size);
+
+ std::string contents;
+ EXPECT_TRUE(base::ReadFileToString(full_file_name, &contents));
+ // Test for a CSS encoded character. This used to use HTML encoding.
+ EXPECT_THAT(contents, HasSubstr("content: \"\\e003 \\e004 b\""));
}
IN_PROC_BROWSER_TEST_F(SavePageBrowserTest, SavePageBrowserTest_NonMHTML) {
« no previous file with comments | « no previous file | chrome/test/data/save_page/1.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698