Unregister from GCM when the only GCM app is removed
[chromium-blink-merge.git] / chrome / test / data / webui / history_ui_browsertest.h
blob0e2cf3415bbdb8232d4b56c44d37cef13bff4c0b
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 class HistoryService;
14 class HistoryUIBrowserTest : public WebUIBrowserTest {
15 public:
16 HistoryUIBrowserTest();
17 ~HistoryUIBrowserTest() override;
19 void SetUpOnMainThread() override;
21 protected:
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();
33 private:
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.
41 int nav_entry_id_;
43 DISALLOW_COPY_AND_ASSIGN(HistoryUIBrowserTest);
46 #endif // CHROME_TEST_DATA_WEBUI_HISTORY_UI_BROWSERTEST_H_