Roll src/third_party/WebKit d9c6159:8139f33 (svn 201974:201975)
[chromium-blink-merge.git] / chrome / test / data / webui / history_ui_browsertest.h
blob2594d2c450fd75ad8a602938294b6eb6b139eeca
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"
12 namespace history {
13 class HistoryService;
16 class HistoryUIBrowserTest : public WebUIBrowserTest {
17 public:
18 HistoryUIBrowserTest();
19 ~HistoryUIBrowserTest() override;
21 void SetUpOnMainThread() override;
23 protected:
24 // Sets the pref to allow or prohibit deleting history entries.
25 void SetDeleteAllowed(bool allowed);
27 // Add a test entry to the history database. The timestamp for the entry will
28 // be |hour_offset| hours after |baseline_time_|.
29 void AddPageToHistory(
30 int hour_offset, const std::string& url, const std::string& title);
32 // Clears kAcceptLanguages pref value.
33 void ClearAcceptLanguages();
35 private:
36 // The HistoryService is owned by the profile.
37 history::HistoryService* history_;
39 // The time from which entries added via AddPageToHistory() will be offset.
40 base::Time baseline_time_;
42 // Counter used to generate a unique ID for each page added to the history.
43 int nav_entry_id_;
45 DISALLOW_COPY_AND_ASSIGN(HistoryUIBrowserTest);
48 #endif // CHROME_TEST_DATA_WEBUI_HISTORY_UI_BROWSERTEST_H_