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

Unified Diff: components/dom_distiller/core/viewer_unittest.cc

Issue 430473007: Font Family Preferences for Distilled Pages (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: styling 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: components/dom_distiller/core/viewer_unittest.cc
diff --git a/components/dom_distiller/core/viewer_unittest.cc b/components/dom_distiller/core/viewer_unittest.cc
index 7aeba31d8b9ac2afc860017455f1aa3239e83aac..7cbcd8b38261d75aa685a2eb9f2242fb6ca33de0 100644
--- a/components/dom_distiller/core/viewer_unittest.cc
+++ b/components/dom_distiller/core/viewer_unittest.cc
@@ -151,4 +151,16 @@ TEST_F(DomDistillerViewerTest, TestGetDistilledPageThemeJsOutput) {
0);
}
+TEST_F(DomDistillerViewerTest, TestGetDistilledPageFontFamilyJsOutput) {
+ std::string kSerifJsFontFamily = "useFontFamily('serif');";
+ std::string kMonospaceJsFontFamily = "useFontFamily('monospace');";
+ std::string kSansSerifJsFontFamily = "useFontFamily('sans-serif');";
+ EXPECT_EQ(kSerifJsFontFamily.compare(
+ viewer::GetDistilledPageFontFamilyJs(DistilledPagePrefs::SERIF)), 0);
+ EXPECT_EQ(kMonospaceJsFontFamily.compare(
+ viewer::GetDistilledPageFontFamilyJs(DistilledPagePrefs::MONOSPACE)), 0);
+ EXPECT_EQ(kSansSerifJsFontFamily.compare(
+ viewer::GetDistilledPageFontFamilyJs(DistilledPagePrefs::SANS_SERIF)), 0);
+}
+
} // namespace dom_distiller
« components/dom_distiller/core/font_family_list.h ('K') | « components/dom_distiller/core/viewer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698