Disable view source for Developer Tools.
[chromium-blink-merge.git] / chrome / test / data / webui / history_ui_browsertest.h
blobef426b597ec0f269f15d79c29450a7c85b49f66e
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_browsertest.h"
12 class HistoryService;
14 class HistoryUIBrowserTest : public WebUIBrowserTest {
15 public:
16 HistoryUIBrowserTest();
17 virtual ~HistoryUIBrowserTest();
19 virtual 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 int32 page_id_;
43 DISALLOW_COPY_AND_ASSIGN(HistoryUIBrowserTest);
46 #endif // CHROME_TEST_DATA_WEBUI_HISTORY_UI_BROWSERTEST_H_