| 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/dom_distiller_service.h" | 7 #include "components/dom_distiller/core/dom_distiller_service.h" |
| 8 #include "components/dom_distiller/core/dom_distiller_test_util.h" | 8 #include "components/dom_distiller/core/dom_distiller_test_util.h" |
| 9 #include "components/dom_distiller/core/task_tracker.h" | 9 #include "components/dom_distiller/core/task_tracker.h" |
| 10 #include "components/dom_distiller/core/url_constants.h" | 10 #include "components/dom_distiller/core/url_constants.h" |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 virtual scoped_ptr<ArticleEntry> RemoveEntry(const std::string&) { | 59 virtual scoped_ptr<ArticleEntry> RemoveEntry(const std::string&) { |
| 60 return scoped_ptr<ArticleEntry>(RemoveEntryImpl()); | 60 return scoped_ptr<ArticleEntry>(RemoveEntryImpl()); |
| 61 } | 61 } |
| 62 virtual scoped_ptr<DistillerPage> CreateDefaultDistillerPage() { | 62 virtual scoped_ptr<DistillerPage> CreateDefaultDistillerPage() { |
| 63 return scoped_ptr<DistillerPage>(); | 63 return scoped_ptr<DistillerPage>(); |
| 64 } | 64 } |
| 65 virtual scoped_ptr<DistillerPage> CreateDefaultDistillerPageWithHandle( | 65 virtual scoped_ptr<DistillerPage> CreateDefaultDistillerPageWithHandle( |
| 66 scoped_ptr<SourcePageHandle> handle) { | 66 scoped_ptr<SourcePageHandle> handle) { |
| 67 return scoped_ptr<DistillerPage>(); | 67 return scoped_ptr<DistillerPage>(); |
| 68 } | 68 } |
| 69 virtual ReaderModePrefs* GetReaderModePrefs() const OVERRIDE; |
| 69 }; | 70 }; |
| 70 | 71 |
| 71 class DomDistillerViewerTest : public testing::Test { | 72 class DomDistillerViewerTest : public testing::Test { |
| 72 public: | 73 public: |
| 73 virtual void SetUp() OVERRIDE { | 74 virtual void SetUp() OVERRIDE { |
| 74 service_.reset(new TestDomDistillerService()); | 75 service_.reset(new TestDomDistillerService()); |
| 75 } | 76 } |
| 76 | 77 |
| 77 protected: | 78 protected: |
| 78 scoped_ptr<ViewerHandle> CreateViewRequest( | 79 scoped_ptr<ViewerHandle> CreateViewRequest( |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 view_request_delegate.get()); | 123 view_request_delegate.get()); |
| 123 // Specify an internal Chrome page. | 124 // Specify an internal Chrome page. |
| 124 CreateViewRequest("?" + std::string(kUrlKey) + "=chrome%3A%2F%2Fsettings%2F", | 125 CreateViewRequest("?" + std::string(kUrlKey) + "=chrome%3A%2F%2Fsettings%2F", |
| 125 view_request_delegate.get()); | 126 view_request_delegate.get()); |
| 126 // Specify a recursive URL. | 127 // Specify a recursive URL. |
| 127 CreateViewRequest("?" + std::string(kUrlKey) + "=" + | 128 CreateViewRequest("?" + std::string(kUrlKey) + "=" + |
| 128 std::string(kTestScheme) + "%3A%2F%2Fabc-def%2F", | 129 std::string(kTestScheme) + "%3A%2F%2Fabc-def%2F", |
| 129 view_request_delegate.get()); | 130 view_request_delegate.get()); |
| 130 } | 131 } |
| 131 | 132 |
| 133 ReaderModePrefs* TestDomDistillerService::GetReaderModePrefs() const { |
| 134 return NULL; |
| 135 } |
| 136 |
| 132 } // namespace dom_distiller | 137 } // namespace dom_distiller |
| OLD | NEW |