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

Unified Diff: chrome/test/data/webui/history_ui_browsertest.cc

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 side-by-side diff with in-line comments
Download patch
Index: chrome/test/data/webui/history_ui_browsertest.cc
diff --git a/chrome/test/data/webui/history_ui_browsertest.cc b/chrome/test/data/webui/history_ui_browsertest.cc
index e4ff21eed9f86d62895bd8f0ec9ec85cbe072eb7..0a60f20ffbd8c3b31d16e3b9ede77ab7490645b1 100644
--- a/chrome/test/data/webui/history_ui_browsertest.cc
+++ b/chrome/test/data/webui/history_ui_browsertest.cc
@@ -13,14 +13,8 @@
#include "components/history/core/browser/history_service.h"
#include "components/prefs/pref_service.h"
-HistoryUIBrowserTest::HistoryUIBrowserTest()
- : history_(NULL),
- baseline_time_(base::Time::Now().LocalMidnight()),
- nav_entry_id_(0) {
-}
-
-HistoryUIBrowserTest::~HistoryUIBrowserTest() {
-}
+HistoryUIBrowserTest::HistoryUIBrowserTest() : history_(nullptr) {}
+HistoryUIBrowserTest::~HistoryUIBrowserTest() {}
void HistoryUIBrowserTest::SetUpOnMainThread() {
WebUIBrowserTest::SetUpOnMainThread();
@@ -30,26 +24,7 @@ void HistoryUIBrowserTest::SetUpOnMainThread() {
ui_test_utils::WaitForHistoryToLoad(history_);
}
-void HistoryUIBrowserTest::AddPageToHistory(
- int hour_offset, const std::string& url, const std::string& title) {
- // We need the ID scope and page ID so that the visit tracker can find it.
- const history::ContextID id_scope = reinterpret_cast<history::ContextID>(1);
-
- base::Time time = baseline_time_ + base::TimeDelta::FromHours(hour_offset);
- GURL gurl = GURL(url);
- history_->AddPage(gurl, time, id_scope, nav_entry_id_++, GURL(),
- history::RedirectList(), ui::PAGE_TRANSITION_LINK,
- history::SOURCE_BROWSED, false);
- history_->SetPageTitle(gurl, base::UTF8ToUTF16(title));
-}
-
void HistoryUIBrowserTest::SetDeleteAllowed(bool allowed) {
browser()->profile()->GetPrefs()->
SetBoolean(prefs::kAllowDeletingBrowserHistory, allowed);
}
-
-void HistoryUIBrowserTest::ClearAcceptLanguages() {
- browser()->profile()->GetPrefs()->
- SetString(prefs::kAcceptLanguages, "");
-}
-
« no previous file with comments | « chrome/test/data/webui/history_ui_browsertest.h ('k') | chrome/test/data/webui/md_history/md_history_browsertest.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698