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
3 // found in the LICENSE file.
5 #ifndef CHROME_TEST_DATA_WEBUI_HISTORY_UI_BROWSERTEST_H_
6 #define CHROME_TEST_DATA_WEBUI_HISTORY_UI_BROWSERTEST_H_
8 #include "base/time/time.h"
10 #include "chrome/test/base/web_ui_browser_test.h"
14 class HistoryUIBrowserTest
: public WebUIBrowserTest
{
16 HistoryUIBrowserTest();
17 ~HistoryUIBrowserTest() override
;
19 void SetUpOnMainThread() override
;
22 // Sets the pref to allow or prohibit deleting history entries.
23 void SetDeleteAllowed(bool allowed
);
25 // Add a test entry to the history database. The timestamp for the entry will
26 // be |hour_offset| hours after |baseline_time_|.
27 void AddPageToHistory(
28 int hour_offset
, const std::string
& url
, const std::string
& title
);
30 // Clears kAcceptLanguages pref value.
31 void ClearAcceptLanguages();
34 // The HistoryService is owned by the profile.
35 HistoryService
* history_
;
37 // The time from which entries added via AddPageToHistory() will be offset.
38 base::Time baseline_time_
;
40 // Counter used to generate a unique ID for each page added to the history.
43 DISALLOW_COPY_AND_ASSIGN(HistoryUIBrowserTest
);
46 #endif // CHROME_TEST_DATA_WEBUI_HISTORY_UI_BROWSERTEST_H_