Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(103)

Side by Side Diff: chrome/test/data/webui/history_ui_browsertest.h

Issue 2830983005: Remove old webui History page on desktop and mobile (Closed)
Patch Set: merge Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_TEST_DATA_WEBUI_HISTORY_UI_BROWSERTEST_H_ 5 #ifndef CHROME_TEST_DATA_WEBUI_HISTORY_UI_BROWSERTEST_H_
6 #define CHROME_TEST_DATA_WEBUI_HISTORY_UI_BROWSERTEST_H_ 6 #define CHROME_TEST_DATA_WEBUI_HISTORY_UI_BROWSERTEST_H_
7 7
8 #include "base/time/time.h"
9
10 #include "base/macros.h" 8 #include "base/macros.h"
11 #include "chrome/test/base/web_ui_browser_test.h" 9 #include "chrome/test/base/web_ui_browser_test.h"
12 10
13 namespace history { 11 namespace history {
14 class HistoryService; 12 class HistoryService;
15 } 13 }
16 14
17 class HistoryUIBrowserTest : public WebUIBrowserTest { 15 class HistoryUIBrowserTest : public WebUIBrowserTest {
18 public: 16 public:
19 HistoryUIBrowserTest(); 17 HistoryUIBrowserTest();
20 ~HistoryUIBrowserTest() override; 18 ~HistoryUIBrowserTest() override;
21 19
22 void SetUpOnMainThread() override; 20 void SetUpOnMainThread() override;
23 21
24 protected: 22 protected:
25 // Sets the pref to allow or prohibit deleting history entries. 23 // Sets the pref to allow or prohibit deleting history entries.
26 void SetDeleteAllowed(bool allowed); 24 void SetDeleteAllowed(bool allowed);
27 25
28 // Add a test entry to the history database. The timestamp for the entry will
29 // be |hour_offset| hours after |baseline_time_|.
30 void AddPageToHistory(
31 int hour_offset, const std::string& url, const std::string& title);
32
33 // Clears kAcceptLanguages pref value.
34 void ClearAcceptLanguages();
35
36 private: 26 private:
37 // The HistoryService is owned by the profile. 27 // The HistoryService is owned by the profile.
38 history::HistoryService* history_; 28 history::HistoryService* history_;
39 29
40 // The time from which entries added via AddPageToHistory() will be offset.
41 base::Time baseline_time_;
42
43 // Counter used to generate a unique ID for each page added to the history.
44 int nav_entry_id_;
45
46 DISALLOW_COPY_AND_ASSIGN(HistoryUIBrowserTest); 30 DISALLOW_COPY_AND_ASSIGN(HistoryUIBrowserTest);
47 }; 31 };
48 32
49 #endif // CHROME_TEST_DATA_WEBUI_HISTORY_UI_BROWSERTEST_H_ 33 #endif // CHROME_TEST_DATA_WEBUI_HISTORY_UI_BROWSERTEST_H_
OLDNEW
« no previous file with comments | « chrome/test/data/webui/history_browsertest.js ('k') | chrome/test/data/webui/history_ui_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698