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

Side by Side Diff: chrome/browser/history/history_browsertest.cc

Issue 1551503002: Convert Pass()→std::move() in //chrome (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <utility>
5 #include <vector> 6 #include <vector>
6 7
7 #include "base/bind.h" 8 #include "base/bind.h"
8 #include "base/command_line.h" 9 #include "base/command_line.h"
9 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
10 #include "base/macros.h" 11 #include "base/macros.h"
11 #include "base/message_loop/message_loop.h" 12 #include "base/message_loop/message_loop.h"
12 #include "base/prefs/pref_service.h" 13 #include "base/prefs/pref_service.h"
13 #include "base/strings/utf_string_conversions.h" 14 #include "base/strings/utf_string_conversions.h"
14 #include "build/build_config.h" 15 #include "build/build_config.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 return ui_test_utils::GetTestUrl( 96 return ui_test_utils::GetTestUrl(
96 base::FilePath(base::FilePath::kCurrentDirectory), 97 base::FilePath(base::FilePath::kCurrentDirectory),
97 base::FilePath(FILE_PATH_LITERAL("title2.html"))); 98 base::FilePath(FILE_PATH_LITERAL("title2.html")));
98 } 99 }
99 100
100 void WaitForHistoryBackendToRun() { 101 void WaitForHistoryBackendToRun() {
101 base::CancelableTaskTracker task_tracker; 102 base::CancelableTaskTracker task_tracker;
102 scoped_ptr<history::HistoryDBTask> task(new WaitForHistoryTask()); 103 scoped_ptr<history::HistoryDBTask> task(new WaitForHistoryTask());
103 history::HistoryService* history = HistoryServiceFactory::GetForProfile( 104 history::HistoryService* history = HistoryServiceFactory::GetForProfile(
104 GetProfile(), ServiceAccessType::EXPLICIT_ACCESS); 105 GetProfile(), ServiceAccessType::EXPLICIT_ACCESS);
105 history->ScheduleDBTask(task.Pass(), &task_tracker); 106 history->ScheduleDBTask(std::move(task), &task_tracker);
106 content::RunMessageLoop(); 107 content::RunMessageLoop();
107 } 108 }
108 109
109 void ExpectEmptyHistory() { 110 void ExpectEmptyHistory() {
110 std::vector<GURL> urls(GetHistoryContents()); 111 std::vector<GURL> urls(GetHistoryContents());
111 EXPECT_EQ(0U, urls.size()); 112 EXPECT_EQ(0U, urls.size());
112 } 113 }
113 114
114 void LoadAndWaitForURL(const GURL& url) { 115 void LoadAndWaitForURL(const GURL& url) {
115 base::string16 expected_title(base::ASCIIToUTF16("OK")); 116 base::string16 expected_title(base::ASCIIToUTF16("OK"));
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 537
537 content::WebContents* active_web_contents = 538 content::WebContents* active_web_contents =
538 browser()->tab_strip_model()->GetActiveWebContents(); 539 browser()->tab_strip_model()->GetActiveWebContents();
539 ASSERT_EQ(web_contents, active_web_contents); 540 ASSERT_EQ(web_contents, active_web_contents);
540 ASSERT_EQ(history_url, active_web_contents->GetURL()); 541 ASSERT_EQ(history_url, active_web_contents->GetURL());
541 542
542 content::WebContents* second_tab = 543 content::WebContents* second_tab =
543 browser()->tab_strip_model()->GetWebContentsAt(1); 544 browser()->tab_strip_model()->GetWebContentsAt(1);
544 ASSERT_NE(history_url, second_tab->GetURL()); 545 ASSERT_NE(history_url, second_tab->GetURL());
545 } 546 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698