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(viewer::GetDistilledPageFontFamilyJs( | |
robliao
2014/08/10 02:43:46
Go ahead and linebreak after the first (.
sunangel
2014/08/11 21:51:33
Done and did it for below for consistency.
On 2014
| |
159 DistilledPagePrefs::SERIF)), | |
160 0); | |
161 EXPECT_EQ(kMonospaceJsFontFamily.compare(viewer::GetDistilledPageFontFamilyJs( | |
162 DistilledPagePrefs::MONOSPACE)), | |
163 0); | |
164 EXPECT_EQ(kSansSerifJsFontFamily.compare(viewer::GetDistilledPageFontFamilyJs( | |
165 DistilledPagePrefs::SANS_SERIF)), | |
166 0); | |
167 } | |
168 | |
154 } // namespace dom_distiller | 169 } // namespace dom_distiller |
OLD | NEW |