1 // Copyright 2016 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef COMPONENTS_NTP_SNIPPETS_REMOTE_TEST_UTILS_H_ 6 #define COMPONENTS_NTP_SNIPPETS_REMOTE_TEST_UTILS_H_ 7 8 #include <memory> 9 10 #include "components/sync_preferences/testing_pref_service_syncable.h" 11 12 using sync_preferences::TestingPrefServiceSyncable; 13 14 namespace ntp_snippets { 15 16 namespace test { 17 18 // Common utilities for remote suggestion tests, handles initializing fakes. 19 class RemoteSuggestionsTestUtils { 20 public: 21 RemoteSuggestionsTestUtils(); 22 ~RemoteSuggestionsTestUtils(); 23 pref_service()24 TestingPrefServiceSyncable* pref_service() { return pref_service_.get(); } 25 26 private: 27 std::unique_ptr<TestingPrefServiceSyncable> pref_service_; 28 }; 29 30 } // namespace test 31 32 } // namespace ntp_snippets 33 34 #endif // COMPONENTS_NTP_SNIPPETS_REMOTE_TEST_UTILS_H_ 35