| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "components/dom_distiller/core/viewer.h" | 5 #include "components/dom_distiller/core/viewer.h" |
| 6 | 6 |
| 7 #include "components/dom_distiller/core/distilled_page_prefs.h" | 7 #include "components/dom_distiller/core/distilled_page_prefs.h" |
| 8 #include "components/dom_distiller/core/dom_distiller_service.h" | 8 #include "components/dom_distiller/core/dom_distiller_service.h" |
| 9 #include "components/dom_distiller/core/dom_distiller_test_util.h" | 9 #include "components/dom_distiller/core/dom_distiller_test_util.h" |
| 10 #include "components/dom_distiller/core/task_tracker.h" | 10 #include "components/dom_distiller/core/task_tracker.h" |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 DistilledPagePrefs::DARK)), | 144 DistilledPagePrefs::DARK)), |
| 145 0); | 145 0); |
| 146 EXPECT_EQ(kLightJs.compare(viewer::GetDistilledPageThemeJs( | 146 EXPECT_EQ(kLightJs.compare(viewer::GetDistilledPageThemeJs( |
| 147 DistilledPagePrefs::LIGHT)), | 147 DistilledPagePrefs::LIGHT)), |
| 148 0); | 148 0); |
| 149 EXPECT_EQ(kSepiaJs.compare(viewer::GetDistilledPageThemeJs( | 149 EXPECT_EQ(kSepiaJs.compare(viewer::GetDistilledPageThemeJs( |
| 150 DistilledPagePrefs::SEPIA)), | 150 DistilledPagePrefs::SEPIA)), |
| 151 0); | 151 0); |
| 152 } | 152 } |
| 153 | 153 |
| 154 TEST_F(DomDistillerViewerTest, TestGetDistilledPageFontFamilyJsOutput) { |
| 155 std::string kSerifJsFontFamily = "useFontFamily('serif');"; |
| 156 std::string kMonospaceJsFontFamily = "useFontFamily('monospace');"; |
| 157 std::string kSansSerifJsFontFamily = "useFontFamily('sans-serif');"; |
| 158 EXPECT_EQ(kSerifJsFontFamily.compare( |
| 159 viewer::GetDistilledPageFontFamilyJs(DistilledPagePrefs::SERIF)), 0); |
| 160 EXPECT_EQ(kMonospaceJsFontFamily.compare( |
| 161 viewer::GetDistilledPageFontFamilyJs(DistilledPagePrefs::MONOSPACE)), 0); |
| 162 EXPECT_EQ(kSansSerifJsFontFamily.compare( |
| 163 viewer::GetDistilledPageFontFamilyJs(DistilledPagePrefs::SANS_SERIF)), 0); |
| 164 } |
| 165 |
| 154 } // namespace dom_distiller | 166 } // namespace dom_distiller |
| OLD | NEW |