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

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

Issue 8437002: Move BrowserThread to content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: A few updates. Created 9 years, 1 month 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"
11 #include "base/utf_string_conversions.h" 11 #include "base/utf_string_conversions.h"
12 #include "chrome/browser/search_engines/search_provider_install_data.h" 12 #include "chrome/browser/search_engines/search_provider_install_data.h"
13 #include "chrome/browser/search_engines/template_url.h" 13 #include "chrome/browser/search_engines/template_url.h"
14 #include "chrome/browser/search_engines/template_url_service.h" 14 #include "chrome/browser/search_engines/template_url_service.h"
15 #include "chrome/browser/search_engines/template_url_service_test_util.h" 15 #include "chrome/browser/search_engines/template_url_service_test_util.h"
16 #include "chrome/common/chrome_notification_types.h" 16 #include "chrome/common/chrome_notification_types.h"
17 #include "chrome/common/pref_names.h" 17 #include "chrome/common/pref_names.h"
18 #include "chrome/test/base/testing_pref_service.h" 18 #include "chrome/test/base/testing_pref_service.h"
19 #include "chrome/test/base/testing_profile.h" 19 #include "chrome/test/base/testing_profile.h"
20 #include "content/public/browser/notification_service.h" 20 #include "content/public/browser/notification_service.h"
21 #include "content/public/browser/notification_source.h" 21 #include "content/public/browser/notification_source.h"
22 #include "content/test/test_browser_thread.h" 22 #include "content/test/test_browser_thread.h"
23 #include "testing/gtest/include/gtest/gtest.h" 23 #include "testing/gtest/include/gtest/gtest.h"
24 24
25 using content::BrowserThread;
26
25 // Create a TemplateURL. The caller owns the returned TemplateURL*. 27 // Create a TemplateURL. The caller owns the returned TemplateURL*.
26 static TemplateURL* CreateTemplateURL(const std::string& url, 28 static TemplateURL* CreateTemplateURL(const std::string& url,
27 const std::string& keyword) { 29 const std::string& keyword) {
28 TemplateURL* t_url = new TemplateURL(); 30 TemplateURL* t_url = new TemplateURL();
29 t_url->SetURL(url, 0, 0); 31 t_url->SetURL(url, 0, 0);
30 t_url->set_keyword(UTF8ToUTF16(keyword)); 32 t_url->set_keyword(UTF8ToUTF16(keyword));
31 t_url->set_short_name(UTF8ToUTF16(keyword)); 33 t_url->set_short_name(UTF8ToUTF16(keyword));
32 return t_url; 34 return t_url;
33 } 35 }
34 36
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 // Change the Google base url. 307 // Change the Google base url.
306 google_host = "foo.com"; 308 google_host = "foo.com";
307 util_.SetGoogleBaseURL("http://" + google_host + "/"); 309 util_.SetGoogleBaseURL("http://" + google_host + "/");
308 // Wait for the I/O thread to process the update notification. 310 // Wait for the I/O thread to process the update notification.
309 TemplateURLServiceTestUtil::BlockTillIOThreadProcessesRequests(); 311 TemplateURLServiceTestUtil::BlockTillIOThreadProcessesRequests();
310 312
311 // Verify that the change got picked up. 313 // Verify that the change got picked up.
312 test_get_install_state->set_search_provider_host(google_host); 314 test_get_install_state->set_search_provider_host(google_host);
313 EXPECT_TRUE(test_get_install_state->RunTests()); 315 EXPECT_TRUE(test_get_install_state->RunTests());
314 } 316 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698