| 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 7c1b0752849aebde6b3869573a164f2c7be3936a..422194f2e471084965c346b791b8178d1b5b2099 100644
|
| --- a/components/dom_distiller/core/viewer_unittest.cc
|
| +++ b/components/dom_distiller/core/viewer_unittest.cc
|
| @@ -6,6 +6,7 @@
|
|
|
| #include "components/dom_distiller/core/dom_distiller_service.h"
|
| #include "components/dom_distiller/core/dom_distiller_test_util.h"
|
| +#include "components/dom_distiller/core/reader_mode_preferences.h"
|
| #include "components/dom_distiller/core/task_tracker.h"
|
| #include "components/dom_distiller/core/url_constants.h"
|
| #include "testing/gtest/include/gtest/gtest.h"
|
| @@ -66,6 +67,7 @@ class TestDomDistillerService : public DomDistillerServiceInterface {
|
| scoped_ptr<SourcePageHandle> handle) {
|
| return scoped_ptr<DistillerPage>();
|
| }
|
| + virtual ReaderModePrefs* GetReaderModePrefs() OVERRIDE;
|
| };
|
|
|
| class DomDistillerViewerTest : public testing::Test {
|
| @@ -129,4 +131,20 @@ TEST_F(DomDistillerViewerTest, TestCreatingInvalidViewRequest) {
|
| view_request_delegate.get());
|
| }
|
|
|
| +ReaderModePrefs* TestDomDistillerService::GetReaderModePrefs() {
|
| + return NULL;
|
| +}
|
| +
|
| +TEST_F(DomDistillerViewerTest, TestGetBodyCssClassOutput) {
|
| + std::string kDark = "dark";
|
| + std::string kSepia = "sepia";
|
| + std::string kLight = "light";
|
| + ASSERT_EQ(kDark.compare(viewer::GetBodyCssClass(
|
| + ReaderModePrefs::Theme::kDark)), 0);
|
| + ASSERT_EQ(kLight.compare(viewer::GetBodyCssClass(
|
| + ReaderModePrefs::Theme::kLight)), 0);
|
| + ASSERT_EQ(kSepia.compare(viewer::GetBodyCssClass(
|
| + ReaderModePrefs::Theme::kSepia)), 0);
|
| +}
|
| +
|
| } // namespace dom_distiller
|
|
|