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 |