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

Side by Side Diff: chrome/browser/ui/search/instant_extended_interactive_uitest.cc

Issue 2083363002: Remove calls to deprecated MessageLoop methods in chrome. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 #include <stdint.h> 5 #include <stdint.h>
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #include "base/base_switches.h" 9 #include "base/base_switches.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 void BlockUntilHistoryProcessesPendingRequests() { 221 void BlockUntilHistoryProcessesPendingRequests() {
222 history::HistoryService* history = HistoryServiceFactory::GetForProfile( 222 history::HistoryService* history = HistoryServiceFactory::GetForProfile(
223 browser()->profile(), ServiceAccessType::EXPLICIT_ACCESS); 223 browser()->profile(), ServiceAccessType::EXPLICIT_ACCESS);
224 DCHECK(history); 224 DCHECK(history);
225 DCHECK(base::MessageLoop::current()); 225 DCHECK(base::MessageLoop::current());
226 226
227 base::CancelableTaskTracker tracker; 227 base::CancelableTaskTracker tracker;
228 history->ScheduleDBTask( 228 history->ScheduleDBTask(
229 std::unique_ptr<history::HistoryDBTask>(new QuittingHistoryDBTask()), 229 std::unique_ptr<history::HistoryDBTask>(new QuittingHistoryDBTask()),
230 &tracker); 230 &tracker);
231 base::MessageLoop::current()->Run(); 231 base::RunLoop().Run();
232 } 232 }
233 233
234 int CountSearchProviderSuggestions() { 234 int CountSearchProviderSuggestions() {
235 return omnibox()->model()->autocomplete_controller()->search_provider()-> 235 return omnibox()->model()->autocomplete_controller()->search_provider()->
236 matches().size(); 236 matches().size();
237 } 237 }
238 238
239 int on_most_visited_change_calls_; 239 int on_most_visited_change_calls_;
240 int most_visited_items_count_; 240 int most_visited_items_count_;
241 int first_most_visited_item_id_; 241 int first_most_visited_item_id_;
(...skipping 728 matching lines...) Expand 10 before | Expand all | Expand 10 after
970 stream << "link.href = \"" << result_url.spec() << "\";"; 970 stream << "link.href = \"" << result_url.spec() << "\";";
971 stream << "document.body.appendChild(link);"; 971 stream << "document.body.appendChild(link);";
972 stream << "link.click();"; 972 stream << "link.click();";
973 EXPECT_TRUE(content::ExecuteScript(contents, stream.str())); 973 EXPECT_TRUE(content::ExecuteScript(contents, stream.str()));
974 974
975 content::WaitForLoadStop(contents); 975 content::WaitForLoadStop(contents);
976 std::string expected_title = 976 std::string expected_title =
977 "Referrer is " + instant_url().GetWithEmptyPath().spec(); 977 "Referrer is " + instant_url().GetWithEmptyPath().spec();
978 EXPECT_EQ(ASCIIToUTF16(expected_title), contents->GetTitle()); 978 EXPECT_EQ(ASCIIToUTF16(expected_title), contents->GetTitle());
979 } 979 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_browsertest.cc ('k') | chrome/browser/ui/toolbar/back_forward_menu_model_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698