// Copyright 2015 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef COMPONENTS_HISTORY_CORE_TEST_FAKE_WEB_HISTORY_SERVICE_H_ #define COMPONENTS_HISTORY_CORE_TEST_FAKE_WEB_HISTORY_SERVICE_H_ #include <string> #include <utility> #include <vector> #include "base/time/time.h" #include "components/history/core/browser/web_history_service.h" #include "url/gurl.h" namespace history { // A fake WebHistoryService for testing. // // Use `AddSyncedVisit` to fill the fake server-side database of synced visits. // Use `SetupFakeResponse` to influence whether the requests should succeed // or fail, and with which error code. // // Note: The behavior of this class is only defined for some WebHistoryService // queries. If needed, improve FakeRequest::GetResponseBody() to simulate // responses for other queries. // // TODO(msramek): This class might need its own set of tests. class FakeWebHistoryService : public WebHistoryService { … }; } // namespace history #endif // COMPONENTS_HISTORY_CORE_TEST_FAKE_WEB_HISTORY_SERVICE_H_