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

Unified Diff: chrome/browser/dom_distiller/dom_distiller_viewer_source_browsertest.cc

Issue 430473007: Font Family Preferences for Distilled Pages (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: synced Created 6 years, 4 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: chrome/browser/dom_distiller/dom_distiller_viewer_source_browsertest.cc
diff --git a/chrome/browser/dom_distiller/dom_distiller_viewer_source_browsertest.cc b/chrome/browser/dom_distiller/dom_distiller_viewer_source_browsertest.cc
index bd2501d8d73307723e20ccb51e2688f30c0b8db2..20a5aefe07311a63a21e576dd4adb49407ac5c2e 100644
--- a/chrome/browser/dom_distiller/dom_distiller_viewer_source_browsertest.cc
+++ b/chrome/browser/dom_distiller/dom_distiller_viewer_source_browsertest.cc
@@ -342,9 +342,8 @@ IN_PROC_BROWSER_TEST_F(DomDistillerViewerSourceBrowserTest, PrefChange) {
std::string result;
EXPECT_TRUE(content::ExecuteScriptAndExtractString(
contents, kGetBodyClass, &result));
- EXPECT_EQ("light", result);
+ EXPECT_EQ("light sans-serif", result);
- // Getting DistilledPagePrefs instance.
DistilledPagePrefs* distilled_page_prefs =
DomDistillerServiceFactory::GetForBrowserContext(
browser()->profile())->GetDistilledPagePrefs();
@@ -353,7 +352,13 @@ IN_PROC_BROWSER_TEST_F(DomDistillerViewerSourceBrowserTest, PrefChange) {
base::RunLoop().RunUntilIdle();
EXPECT_TRUE(content::ExecuteScriptAndExtractString(
contents, kGetBodyClass, &result));
- EXPECT_EQ("dark", result);
+ EXPECT_EQ("dark sans-serif", result);
+
+ distilled_page_prefs->SetFontFamily(DistilledPagePrefs::SERIF);
+ base::RunLoop().RunUntilIdle();
+ EXPECT_TRUE(
+ content::ExecuteScriptAndExtractString(contents, kGetBodyClass, &result));
+ EXPECT_EQ("dark serif", result);
}
} // namespace dom_distiller

Powered by Google App Engine
This is Rietveld 408576698