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

Side by Side Diff: chrome/browser/search_engines/search_provider_install_data_unittest.cc

Issue 8873032: Removing MessageLoop::QuitTask() from chrome/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Revert 3 more problematic files Created 9 years 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
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 <string> 5 #include <string>
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 VerifyInstallState(SearchProviderInstallData::NOT_INSTALLED, 131 VerifyInstallState(SearchProviderInstallData::NOT_INSTALLED,
132 "http://a" + search_provider_host_ + "/"); 132 "http://a" + search_provider_host_ + "/");
133 133
134 // Installed as default. 134 // Installed as default.
135 if (!default_search_provider_host_.empty()) { 135 if (!default_search_provider_host_.empty()) {
136 VerifyInstallState(SearchProviderInstallData::INSTALLED_AS_DEFAULT, 136 VerifyInstallState(SearchProviderInstallData::INSTALLED_AS_DEFAULT,
137 "http://" + default_search_provider_host_ + "/"); 137 "http://" + default_search_provider_host_ + "/");
138 } 138 }
139 139
140 // All done. 140 // All done.
141 main_loop_->PostTask(FROM_HERE, new MessageLoop::QuitTask()); 141 main_loop_->PostTask(FROM_HERE, MessageLoop::QuitClosure());
142 } 142 }
143 143
144 void TestGetInstallState::VerifyInstallState( 144 void TestGetInstallState::VerifyInstallState(
145 SearchProviderInstallData::State expected_state, 145 SearchProviderInstallData::State expected_state,
146 const std::string& url) { 146 const std::string& url) {
147 147
148 SearchProviderInstallData::State actual_state = 148 SearchProviderInstallData::State actual_state =
149 install_data_->GetInstallState(GURL(url)); 149 install_data_->GetInstallState(GURL(url));
150 if (expected_state == actual_state) 150 if (expected_state == actual_state)
151 return; 151 return;
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 // Change the Google base url. 306 // Change the Google base url.
307 google_host = "foo.com"; 307 google_host = "foo.com";
308 util_.SetGoogleBaseURL("http://" + google_host + "/"); 308 util_.SetGoogleBaseURL("http://" + google_host + "/");
309 // Wait for the I/O thread to process the update notification. 309 // Wait for the I/O thread to process the update notification.
310 TemplateURLServiceTestUtil::BlockTillIOThreadProcessesRequests(); 310 TemplateURLServiceTestUtil::BlockTillIOThreadProcessesRequests();
311 311
312 // Verify that the change got picked up. 312 // Verify that the change got picked up.
313 test_get_install_state->set_search_provider_host(google_host); 313 test_get_install_state->set_search_provider_host(google_host);
314 EXPECT_TRUE(test_get_install_state->RunTests()); 314 EXPECT_TRUE(test_get_install_state->RunTests());
315 } 315 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698