| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef COMPONENTS_DOM_DISTILLER_CORE_DOM_DISTILLER_TEST_UTIL_H_ | 5 #ifndef COMPONENTS_DOM_DISTILLER_CORE_DOM_DISTILLER_TEST_UTIL_H_ |
| 6 #define COMPONENTS_DOM_DISTILLER_CORE_DOM_DISTILLER_TEST_UTIL_H_ | 6 #define COMPONENTS_DOM_DISTILLER_CORE_DOM_DISTILLER_TEST_UTIL_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "components/dom_distiller/core/dom_distiller_observer.h" | 10 #include "components/dom_distiller/core/dom_distiller_observer.h" |
| 11 #include "components/dom_distiller/core/fake_db.h" | 11 #include "components/leveldb_proto/testing/fake_db.h" |
| 12 #include "testing/gmock/include/gmock/gmock.h" | 12 #include "testing/gmock/include/gmock/gmock.h" |
| 13 | 13 |
| 14 namespace dom_distiller { | 14 namespace dom_distiller { |
| 15 | 15 |
| 16 class DomDistillerStore; | 16 class DomDistillerStore; |
| 17 | 17 |
| 18 namespace test { | 18 namespace test { |
| 19 namespace util { | 19 namespace util { |
| 20 | 20 |
| 21 class ObserverUpdatesMatcher | 21 class ObserverUpdatesMatcher |
| (...skipping 13 matching lines...) Expand all Loading... |
| 35 private: | 35 private: |
| 36 void DescribeUpdates(std::ostream* os) const; | 36 void DescribeUpdates(std::ostream* os) const; |
| 37 const std::vector<DomDistillerObserver::ArticleUpdate>& expected_updates_; | 37 const std::vector<DomDistillerObserver::ArticleUpdate>& expected_updates_; |
| 38 }; | 38 }; |
| 39 | 39 |
| 40 testing::Matcher<const std::vector<DomDistillerObserver::ArticleUpdate>&> | 40 testing::Matcher<const std::vector<DomDistillerObserver::ArticleUpdate>&> |
| 41 HasExpectedUpdates(const std::vector<DomDistillerObserver::ArticleUpdate>&); | 41 HasExpectedUpdates(const std::vector<DomDistillerObserver::ArticleUpdate>&); |
| 42 | 42 |
| 43 // Creates a simple DomDistillerStore backed by |fake_db| and initialized | 43 // Creates a simple DomDistillerStore backed by |fake_db| and initialized |
| 44 // with |store_model|. | 44 // with |store_model|. |
| 45 DomDistillerStore* CreateStoreWithFakeDB(FakeDB* fake_db, | 45 DomDistillerStore* CreateStoreWithFakeDB( |
| 46 const FakeDB::EntryMap& store_model); | 46 leveldb_proto::test::FakeDB<ArticleEntry>* fake_db, |
| 47 const leveldb_proto::test::FakeDB<ArticleEntry>::EntryMap& store_model); |
| 47 | 48 |
| 48 } // namespace util | 49 } // namespace util |
| 49 } // namespace test | 50 } // namespace test |
| 50 } // namespace dom_distiller | 51 } // namespace dom_distiller |
| 51 | 52 |
| 52 #endif // COMPONENTS_DOM_DISTILLER_CORE_DOM_DISTILLER_TEST_UTIL_H_ | 53 #endif // COMPONENTS_DOM_DISTILLER_CORE_DOM_DISTILLER_TEST_UTIL_H_ |
| OLD | NEW |