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

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: 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
« no previous file with comments | « components/dom_distiller/core/viewer.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..eaddd71c731069f3fc85201f27ff8b4637175b2c 100644
--- a/components/dom_distiller/core/viewer_unittest.cc
+++ b/components/dom_distiller/core/viewer_unittest.cc
@@ -151,4 +151,19 @@ 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
« no previous file with comments | « components/dom_distiller/core/viewer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698