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

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

Issue 7558014: Add a URL param to indicate group selection in Instant field trial. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Thread safe handling of Profiles Created 9 years, 4 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
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/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/task.h" 10 #include "base/task.h"
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 SearchProviderInstallDataTest() 161 SearchProviderInstallDataTest()
162 : install_data_(NULL) {} 162 : install_data_(NULL) {}
163 163
164 virtual void SetUp() { 164 virtual void SetUp() {
165 testing::Test::SetUp(); 165 testing::Test::SetUp();
166 util_.SetUp(); 166 util_.SetUp();
167 util_.StartIOThread(); 167 util_.StartIOThread();
168 install_data_ = new SearchProviderInstallData( 168 install_data_ = new SearchProviderInstallData(
169 util_.GetWebDataService(), 169 util_.GetWebDataService(),
170 content::NOTIFICATION_RENDERER_PROCESS_TERMINATED, 170 content::NOTIFICATION_RENDERER_PROCESS_TERMINATED,
171 Source<SearchProviderInstallDataTest>(this)); 171 Source<SearchProviderInstallDataTest>(this),
172 util_.profile());
172 } 173 }
173 174
174 virtual void TearDown() { 175 virtual void TearDown() {
175 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)->PostTask( 176 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)->PostTask(
176 FROM_HERE, 177 FROM_HERE,
177 new DeleteTask<SearchProviderInstallData>(install_data_)); 178 new DeleteTask<SearchProviderInstallData>(install_data_));
178 install_data_ = NULL; 179 install_data_ = NULL;
179 180
180 // Make sure that the install data class on the UI thread gets cleaned up. 181 // Make sure that the install data class on the UI thread gets cleaned up.
181 // It doesn't matter that this happens after install_data_ is deleted. 182 // It doesn't matter that this happens after install_data_ is deleted.
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 // Change the Google base url. 306 // Change the Google base url.
306 google_host = "foo.com"; 307 google_host = "foo.com";
307 util_.SetGoogleBaseURL("http://" + google_host + "/"); 308 util_.SetGoogleBaseURL("http://" + google_host + "/");
308 // Wait for the I/O thread to process the update notification. 309 // Wait for the I/O thread to process the update notification.
309 TemplateURLServiceTestUtil::BlockTillIOThreadProcessesRequests(); 310 TemplateURLServiceTestUtil::BlockTillIOThreadProcessesRequests();
310 311
311 // Verify that the change got picked up. 312 // Verify that the change got picked up.
312 test_get_install_state->set_search_provider_host(google_host); 313 test_get_install_state->set_search_provider_host(google_host);
313 EXPECT_TRUE(test_get_install_state->RunTests()); 314 EXPECT_TRUE(test_get_install_state->RunTests());
314 } 315 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698