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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 return scoped_ptr<ArticleEntry>(RemoveEntryImpl()); | 63 return scoped_ptr<ArticleEntry>(RemoveEntryImpl()); |
64 } | 64 } |
65 virtual scoped_ptr<DistillerPage> CreateDefaultDistillerPage( | 65 virtual scoped_ptr<DistillerPage> CreateDefaultDistillerPage( |
66 const gfx::Size& render_view_size) { | 66 const gfx::Size& render_view_size) { |
67 return scoped_ptr<DistillerPage>(); | 67 return scoped_ptr<DistillerPage>(); |
68 } | 68 } |
69 virtual scoped_ptr<DistillerPage> CreateDefaultDistillerPageWithHandle( | 69 virtual scoped_ptr<DistillerPage> CreateDefaultDistillerPageWithHandle( |
70 scoped_ptr<SourcePageHandle> handle) { | 70 scoped_ptr<SourcePageHandle> handle) { |
71 return scoped_ptr<DistillerPage>(); | 71 return scoped_ptr<DistillerPage>(); |
72 } | 72 } |
73 virtual DistilledPagePrefs* GetDistilledPagePrefs() OVERRIDE; | 73 virtual DistilledPagePrefs* GetDistilledPagePrefs() override; |
74 }; | 74 }; |
75 | 75 |
76 class DomDistillerViewerTest : public testing::Test { | 76 class DomDistillerViewerTest : public testing::Test { |
77 public: | 77 public: |
78 virtual void SetUp() OVERRIDE { | 78 virtual void SetUp() override { |
79 service_.reset(new TestDomDistillerService()); | 79 service_.reset(new TestDomDistillerService()); |
80 } | 80 } |
81 | 81 |
82 protected: | 82 protected: |
83 scoped_ptr<ViewerHandle> CreateViewRequest( | 83 scoped_ptr<ViewerHandle> CreateViewRequest( |
84 const std::string& path, | 84 const std::string& path, |
85 ViewRequestDelegate* view_request_delegate) { | 85 ViewRequestDelegate* view_request_delegate) { |
86 return viewer::CreateViewRequest( | 86 return viewer::CreateViewRequest( |
87 service_.get(), path, view_request_delegate, gfx::Size()); | 87 service_.get(), path, view_request_delegate, gfx::Size()); |
88 } | 88 } |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 0); | 162 0); |
163 EXPECT_EQ(kMonospaceJsFontFamily.compare(viewer::GetDistilledPageFontFamilyJs( | 163 EXPECT_EQ(kMonospaceJsFontFamily.compare(viewer::GetDistilledPageFontFamilyJs( |
164 DistilledPagePrefs::MONOSPACE)), | 164 DistilledPagePrefs::MONOSPACE)), |
165 0); | 165 0); |
166 EXPECT_EQ(kSansSerifJsFontFamily.compare(viewer::GetDistilledPageFontFamilyJs( | 166 EXPECT_EQ(kSansSerifJsFontFamily.compare(viewer::GetDistilledPageFontFamilyJs( |
167 DistilledPagePrefs::SANS_SERIF)), | 167 DistilledPagePrefs::SANS_SERIF)), |
168 0); | 168 0); |
169 } | 169 } |
170 | 170 |
171 } // namespace dom_distiller | 171 } // namespace dom_distiller |
OLD | NEW |