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

Side by Side Diff: chrome/browser/autocomplete/search_provider_unittest.cc

Issue 8343023: rename Run in MessageLoopForUI to RunWithDispatcher (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 9 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « base/message_loop_unittest.cc ('k') | chrome/browser/automation/automation_provider_win.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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/browser/autocomplete/search_provider.h" 5 #include "chrome/browser/autocomplete/search_provider.h"
6 6
7 #include "base/string_util.h" 7 #include "base/string_util.h"
8 #include "base/time.h" 8 #include "base/time.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 } 160 }
161 161
162 void SearchProviderTest::RunTillProviderDone() { 162 void SearchProviderTest::RunTillProviderDone() {
163 if (provider_->done()) 163 if (provider_->done())
164 return; 164 return;
165 165
166 quit_when_done_ = true; 166 quit_when_done_ = true;
167 #if defined(OS_MACOSX) 167 #if defined(OS_MACOSX)
168 message_loop_.Run(); 168 message_loop_.Run();
169 #else 169 #else
170 message_loop_.Run(NULL); 170 message_loop_.RunWithDispatcher(NULL);
171 #endif 171 #endif
172 } 172 }
173 173
174 void SearchProviderTest::QueryForInput(const string16& text, 174 void SearchProviderTest::QueryForInput(const string16& text,
175 bool prevent_inline_autocomplete) { 175 bool prevent_inline_autocomplete) {
176 // Start a query. 176 // Start a query.
177 AutocompleteInput input(text, string16(), prevent_inline_autocomplete, 177 AutocompleteInput input(text, string16(), prevent_inline_autocomplete,
178 false, true, AutocompleteInput::ALL_MATCHES); 178 false, true, AutocompleteInput::ALL_MATCHES);
179 provider_->Start(input, false); 179 provider_->Start(input, false);
180 180
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after
657 fetcher = NULL; 657 fetcher = NULL;
658 658
659 // Run till the history results complete. 659 // Run till the history results complete.
660 RunTillProviderDone(); 660 RunTillProviderDone();
661 661
662 // Make sure there is a match for 'a.com' and it doesn't have a template_url. 662 // Make sure there is a match for 'a.com' and it doesn't have a template_url.
663 AutocompleteMatch nav_match; 663 AutocompleteMatch nav_match;
664 EXPECT_TRUE(FindMatchWithDestination(GURL("http://a.com"), &nav_match)); 664 EXPECT_TRUE(FindMatchWithDestination(GURL("http://a.com"), &nav_match));
665 EXPECT_FALSE(nav_match.template_url); 665 EXPECT_FALSE(nav_match.template_url);
666 } 666 }
OLDNEW
« no previous file with comments | « base/message_loop_unittest.cc ('k') | chrome/browser/automation/automation_provider_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698