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

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

Issue 562603002: Move PageTransition from //content/public/common to //ui/base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 3 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
« no previous file with comments | « chrome/test/base/web_ui_browser_test.cc ('k') | chrome/test/gpu/webgl_infobar_browsertest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "chrome/test/data/webui/history_ui_browsertest.h" 5 #include "chrome/test/data/webui/history_ui_browsertest.h"
6 6
7 #include "base/prefs/pref_service.h" 7 #include "base/prefs/pref_service.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "chrome/browser/history/history_service.h" 9 #include "chrome/browser/history/history_service.h"
10 #include "chrome/browser/history/history_service_factory.h" 10 #include "chrome/browser/history/history_service_factory.h"
(...skipping 20 matching lines...) Expand all
31 } 31 }
32 32
33 void HistoryUIBrowserTest::AddPageToHistory( 33 void HistoryUIBrowserTest::AddPageToHistory(
34 int hour_offset, const std::string& url, const std::string& title) { 34 int hour_offset, const std::string& url, const std::string& title) {
35 // We need the ID scope and page ID so that the visit tracker can find it. 35 // We need the ID scope and page ID so that the visit tracker can find it.
36 const history::ContextID id_scope = reinterpret_cast<history::ContextID>(1); 36 const history::ContextID id_scope = reinterpret_cast<history::ContextID>(1);
37 37
38 base::Time time = baseline_time_ + base::TimeDelta::FromHours(hour_offset); 38 base::Time time = baseline_time_ + base::TimeDelta::FromHours(hour_offset);
39 GURL gurl = GURL(url); 39 GURL gurl = GURL(url);
40 history_->AddPage(gurl, time, id_scope, page_id_++, GURL(), 40 history_->AddPage(gurl, time, id_scope, page_id_++, GURL(),
41 history::RedirectList(), content::PAGE_TRANSITION_LINK, 41 history::RedirectList(), ui::PAGE_TRANSITION_LINK,
42 history::SOURCE_BROWSED, false); 42 history::SOURCE_BROWSED, false);
43 history_->SetPageTitle(gurl, base::UTF8ToUTF16(title)); 43 history_->SetPageTitle(gurl, base::UTF8ToUTF16(title));
44 } 44 }
45 45
46 void HistoryUIBrowserTest::SetDeleteAllowed(bool allowed) { 46 void HistoryUIBrowserTest::SetDeleteAllowed(bool allowed) {
47 browser()->profile()->GetPrefs()-> 47 browser()->profile()->GetPrefs()->
48 SetBoolean(prefs::kAllowDeletingBrowserHistory, allowed); 48 SetBoolean(prefs::kAllowDeletingBrowserHistory, allowed);
49 } 49 }
50 50
51 void HistoryUIBrowserTest::ClearAcceptLanguages() { 51 void HistoryUIBrowserTest::ClearAcceptLanguages() {
52 browser()->profile()->GetPrefs()-> 52 browser()->profile()->GetPrefs()->
53 SetString(prefs::kAcceptLanguages, ""); 53 SetString(prefs::kAcceptLanguages, "");
54 } 54 }
55 55
OLDNEW
« no previous file with comments | « chrome/test/base/web_ui_browser_test.cc ('k') | chrome/test/gpu/webgl_infobar_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698