diff options
187 files changed, 337 insertions, 508 deletions
diff --git a/chrome/browser/app_controller_mac_unittest.mm b/chrome/browser/app_controller_mac_unittest.mm index 4ef85b3..b391fd7 100644 --- a/chrome/browser/app_controller_mac_unittest.mm +++ b/chrome/browser/app_controller_mac_unittest.mm @@ -7,12 +7,9 @@ #include "base/memory/scoped_nsobject.h" #include "chrome/app/chrome_command_ids.h" #import "chrome/browser/app_controller_mac.h" -#include "chrome/test/base/testing_browser_process.h" #include "testing/platform_test.h" class AppControllerTest : public PlatformTest { - private: - ScopedTestingBrowserProcess browser_process_; }; TEST_F(AppControllerTest, DockMenu) { diff --git a/chrome/browser/autocomplete/autocomplete_edit_unittest.cc b/chrome/browser/autocomplete/autocomplete_edit_unittest.cc index 8b26855..18171a6 100644 --- a/chrome/browser/autocomplete/autocomplete_edit_unittest.cc +++ b/chrome/browser/autocomplete/autocomplete_edit_unittest.cc @@ -135,7 +135,6 @@ TEST(AutocompleteEditTest, AdjustTextForCopy) { // Tests that we don't get double http if the user manually inserts http. { "a.de/", 0, false, "http://a.de/", "http://a.de/", true, "http://a.de/" }, }; - ScopedTestingBrowserProcess browser_process; TestingOmniboxView view; TestingAutocompleteEditController controller; TestingProfile profile; diff --git a/chrome/browser/autocomplete/autocomplete_unittest.cc b/chrome/browser/autocomplete/autocomplete_unittest.cc index cf3dec1..633c608 100644 --- a/chrome/browser/autocomplete/autocomplete_unittest.cc +++ b/chrome/browser/autocomplete/autocomplete_unittest.cc @@ -16,7 +16,6 @@ #include "chrome/browser/search_engines/template_url_service_factory.h" #include "chrome/common/chrome_notification_types.h" #include "chrome/test/base/testing_browser_process.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/test/base/testing_profile.h" #include "content/common/notification_observer.h" #include "content/common/notification_registrar.h" @@ -127,8 +126,6 @@ class AutocompleteProviderTest : public testing::Test, const NotificationSource& source, const NotificationDetails& details); - ScopedTestingBrowserProcess browser_process_; - MessageLoopForUI message_loop_; scoped_ptr<AutocompleteController> controller_; NotificationRegistrar registrar_; @@ -273,7 +270,7 @@ TEST_F(AutocompleteProviderTest, AllowExactKeywordMatch) { RunExactKeymatchTest(false); } -typedef TestingBrowserProcessTest AutocompleteTest; +typedef testing::Test AutocompleteTest; TEST_F(AutocompleteTest, InputType) { struct test_data { @@ -464,8 +461,6 @@ TEST(AutocompleteInput, ParseForEmphasizeComponent) { Component(12, 11), kInvalidComponent } }; - ScopedTestingBrowserProcess browser_process; - for (size_t i = 0; i < ARRAYSIZE_UNSAFE(input_cases); ++i) { Component scheme, host; AutocompleteInput::ParseForEmphasizeComponents(input_cases[i].input, diff --git a/chrome/browser/autocomplete/builtin_provider_unittest.cc b/chrome/browser/autocomplete/builtin_provider_unittest.cc index 6a2dd01..8847bf4 100644 --- a/chrome/browser/autocomplete/builtin_provider_unittest.cc +++ b/chrome/browser/autocomplete/builtin_provider_unittest.cc @@ -8,11 +8,10 @@ #include "chrome/browser/autocomplete/builtin_provider.h" #include "chrome/common/url_constants.h" #include "chrome/test/base/testing_browser_process.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "googleurl/src/gurl.h" #include "testing/gtest/include/gtest/gtest.h" -class BuiltinProviderTest : public TestingBrowserProcessTest { +class BuiltinProviderTest : public testing::Test { protected: template<class ResultType> struct test_data { diff --git a/chrome/browser/autocomplete/extension_app_provider_unittest.cc b/chrome/browser/autocomplete/extension_app_provider_unittest.cc index b678634..c92ae93 100644 --- a/chrome/browser/autocomplete/extension_app_provider_unittest.cc +++ b/chrome/browser/autocomplete/extension_app_provider_unittest.cc @@ -5,14 +5,14 @@ #include "base/basictypes.h" #include "base/message_loop.h" #include "base/utf_string_conversions.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/browser/autocomplete/autocomplete_match.h" #include "chrome/browser/autocomplete/extension_app_provider.h" #include "chrome/browser/history/history.h" #include "chrome/browser/history/url_database.h" #include "chrome/test/base/testing_profile.h" +#include "testing/gtest/include/gtest/gtest.h" -class ExtensionAppProviderTest : public TestingBrowserProcessTest { +class ExtensionAppProviderTest : public testing::Test { protected: struct test_data { const string16 input; diff --git a/chrome/browser/autocomplete/history_contents_provider_unittest.cc b/chrome/browser/autocomplete/history_contents_provider_unittest.cc index 037506b..170a924 100644 --- a/chrome/browser/autocomplete/history_contents_provider_unittest.cc +++ b/chrome/browser/autocomplete/history_contents_provider_unittest.cc @@ -12,7 +12,6 @@ #include "chrome/browser/bookmarks/bookmark_model.h" #include "chrome/browser/history/history.h" #include "chrome/test/base/testing_browser_process.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/test/base/testing_profile.h" #include "content/browser/browser_thread.h" #include "testing/gtest/include/gtest/gtest.h" @@ -32,7 +31,7 @@ struct TestEntry { {"http://www.google.com/3", "PAGETHREE 3", "BAR some hello world for you"}, }; -class HistoryContentsProviderTest : public TestingBrowserProcessTest, +class HistoryContentsProviderTest : public testing::Test, public ACProviderListener { public: HistoryContentsProviderTest() diff --git a/chrome/browser/autocomplete/history_quick_provider_unittest.cc b/chrome/browser/autocomplete/history_quick_provider_unittest.cc index 62730a2..021efb7 100644 --- a/chrome/browser/autocomplete/history_quick_provider_unittest.cc +++ b/chrome/browser/autocomplete/history_quick_provider_unittest.cc @@ -21,7 +21,6 @@ #include "chrome/browser/prefs/pref_service.h" #include "chrome/common/pref_names.h" #include "chrome/test/base/testing_browser_process.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/test/base/testing_profile.h" #include "content/browser/browser_thread.h" #include "testing/gtest/include/gtest/gtest.h" @@ -72,7 +71,7 @@ struct TestURLInfo { "Dogs & Cats & Mice & Other Animals", 1, 1, 0}, }; -class HistoryQuickProviderTest : public TestingBrowserProcessTest, +class HistoryQuickProviderTest : public testing::Test, public ACProviderListener { public: HistoryQuickProviderTest() diff --git a/chrome/browser/autocomplete/history_url_provider_unittest.cc b/chrome/browser/autocomplete/history_url_provider_unittest.cc index 4e4682b..29fa5a7 100644 --- a/chrome/browser/autocomplete/history_url_provider_unittest.cc +++ b/chrome/browser/autocomplete/history_url_provider_unittest.cc @@ -13,7 +13,6 @@ #include "chrome/browser/history/history.h" #include "chrome/browser/net/url_fixer_upper.h" #include "chrome/test/base/testing_browser_process.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/test/base/testing_profile.h" #include "content/browser/browser_thread.h" #include "testing/gtest/include/gtest/gtest.h" @@ -98,7 +97,7 @@ struct TestURLInfo { {"http://p/", "p", 0, 0}, }; -class HistoryURLProviderTest : public TestingBrowserProcessTest, +class HistoryURLProviderTest : public testing::Test, public ACProviderListener { public: HistoryURLProviderTest() diff --git a/chrome/browser/autocomplete/keyword_provider_unittest.cc b/chrome/browser/autocomplete/keyword_provider_unittest.cc index 2113e30..7a02a97 100644 --- a/chrome/browser/autocomplete/keyword_provider_unittest.cc +++ b/chrome/browser/autocomplete/keyword_provider_unittest.cc @@ -9,11 +9,10 @@ #include "chrome/browser/search_engines/template_url.h" #include "chrome/browser/search_engines/template_url_service.h" #include "chrome/test/base/testing_browser_process.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "googleurl/src/gurl.h" #include "testing/gtest/include/gtest/gtest.h" -class KeywordProviderTest : public TestingBrowserProcessTest { +class KeywordProviderTest : public testing::Test { protected: template<class ResultType> struct test_data { diff --git a/chrome/browser/autocomplete/search_provider_unittest.cc b/chrome/browser/autocomplete/search_provider_unittest.cc index cdc7a24..e5e98ff 100644 --- a/chrome/browser/autocomplete/search_provider_unittest.cc +++ b/chrome/browser/autocomplete/search_provider_unittest.cc @@ -17,7 +17,6 @@ #include "chrome/browser/search_engines/template_url_service_factory.h" #include "chrome/common/pref_names.h" #include "chrome/test/base/testing_browser_process.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/test/base/testing_profile.h" #include "content/browser/browser_thread.h" #include "content/test/test_url_fetcher_factory.h" @@ -33,7 +32,7 @@ // . The URL created by using the search term keyword_term_ with keyword_t_url_ // is added to history. // . test_factory_ is set as the URLFetcher::Factory. -class SearchProviderTest : public TestingBrowserProcessTest, +class SearchProviderTest : public testing::Test, public AutocompleteProvider::ACProviderListener { public: SearchProviderTest() diff --git a/chrome/browser/autocomplete/shortcuts_provider_unittest.cc b/chrome/browser/autocomplete/shortcuts_provider_unittest.cc index 4e275bc..be748cc 100644 --- a/chrome/browser/autocomplete/shortcuts_provider_unittest.cc +++ b/chrome/browser/autocomplete/shortcuts_provider_unittest.cc @@ -22,7 +22,6 @@ #include "chrome/browser/prefs/pref_service.h" #include "chrome/common/pref_names.h" #include "chrome/test/base/testing_browser_process.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/test/base/testing_profile.h" #include "content/browser/browser_thread.h" #include "testing/gtest/include/gtest/gtest.h" @@ -95,7 +94,7 @@ struct TestShortcutInfo { "Test - site", "0,0", 1, 4}, }; -class ShortcutsProviderTest : public TestingBrowserProcessTest, +class ShortcutsProviderTest : public testing::Test, public ACProviderListener { public: ShortcutsProviderTest(); diff --git a/chrome/browser/autocomplete_history_manager_unittest.cc b/chrome/browser/autocomplete_history_manager_unittest.cc index fdd9bed..44ad316 100644 --- a/chrome/browser/autocomplete_history_manager_unittest.cc +++ b/chrome/browser/autocomplete_history_manager_unittest.cc @@ -11,7 +11,6 @@ #include "chrome/browser/autocomplete_history_manager.h" #include "chrome/browser/webdata/web_data_service.h" #include "chrome/test/base/testing_browser_process.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/test/base/testing_profile.h" #include "content/browser/renderer_host/test_render_view_host.h" #include "content/browser/tab_contents/test_tab_contents.h" diff --git a/chrome/browser/autofill/address_unittest.cc b/chrome/browser/autofill/address_unittest.cc index 0696bb9..10d2414 100644 --- a/chrome/browser/autofill/address_unittest.cc +++ b/chrome/browser/autofill/address_unittest.cc @@ -8,10 +8,9 @@ #include "base/utf_string_conversions.h" #include "chrome/browser/autofill/address.h" #include "chrome/browser/autofill/autofill_type.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "testing/gtest/include/gtest/gtest.h" -typedef TestingBrowserProcessTest AddressTest; +typedef testing::Test AddressTest; // Test that the getters and setters for country code are working. TEST_F(AddressTest, CountryCode) { diff --git a/chrome/browser/autofill/autofill_download_unittest.cc b/chrome/browser/autofill/autofill_download_unittest.cc index 58ea787..3b6f1ac 100644 --- a/chrome/browser/autofill/autofill_download_unittest.cc +++ b/chrome/browser/autofill/autofill_download_unittest.cc @@ -14,7 +14,6 @@ #include "chrome/browser/autofill/form_structure.h" #include "chrome/test/base/test_url_request_context_getter.h" #include "chrome/test/base/testing_browser_process.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/test/base/testing_profile.h" #include "content/test/test_url_fetcher_factory.h" #include "net/url_request/url_request_status.h" @@ -115,7 +114,7 @@ class AutofillDownloadTestHelper : public AutofillDownloadManager::Observer { scoped_refptr<net::URLRequestContextGetter> request_context_getter; }; -typedef TestingBrowserProcessTest AutofillDownloadTest; +typedef testing::Test AutofillDownloadTest; TEST_F(AutofillDownloadTest, QueryAndUploadTest) { MessageLoopForUI message_loop; diff --git a/chrome/browser/autofill/autofill_ie_toolbar_import_win_unittest.cc b/chrome/browser/autofill/autofill_ie_toolbar_import_win_unittest.cc index 68fc918..f98e52a 100644 --- a/chrome/browser/autofill/autofill_ie_toolbar_import_win_unittest.cc +++ b/chrome/browser/autofill/autofill_ie_toolbar_import_win_unittest.cc @@ -11,7 +11,6 @@ #include "chrome/browser/autofill/credit_card.h" #include "chrome/browser/autofill/field_types.h" #include "chrome/browser/sync/util/data_encryption.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "testing/gtest/include/gtest/gtest.h" using base::win::RegKey; @@ -108,7 +107,7 @@ void CreateSubkey(RegKey* key, wchar_t const* subkey_name, } // namespace -class AutofillIeToolbarImportTest : public TestingBrowserProcessTest { +class AutofillIeToolbarImportTest : public testing::Test { public: AutofillIeToolbarImportTest(); diff --git a/chrome/browser/autofill/autofill_merge_unittest.cc b/chrome/browser/autofill/autofill_merge_unittest.cc index 5092d72..e1d364f 100644 --- a/chrome/browser/autofill/autofill_merge_unittest.cc +++ b/chrome/browser/autofill/autofill_merge_unittest.cc @@ -13,7 +13,6 @@ #include "chrome/browser/autofill/data_driven_test.h" #include "chrome/browser/autofill/form_structure.h" #include "chrome/browser/autofill/personal_data_manager.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "googleurl/src/gurl.h" #include "testing/gtest/include/gtest/gtest.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputElement.h" @@ -113,7 +112,7 @@ const std::vector<AutofillProfile*>& PersonalDataManagerMock::web_profiles() // corresponding output file is a dump of the saved profiles that result from // importing the input profiles. The output file format is identical to the // input format. -class AutofillMergeTest : public TestingBrowserProcessTest, +class AutofillMergeTest : public testing::Test, public DataDrivenTest { protected: AutofillMergeTest(); diff --git a/chrome/browser/autofill/autofill_profile_unittest.cc b/chrome/browser/autofill/autofill_profile_unittest.cc index 02f7c2d..6c1297e 100644 --- a/chrome/browser/autofill/autofill_profile_unittest.cc +++ b/chrome/browser/autofill/autofill_profile_unittest.cc @@ -11,7 +11,6 @@ #include "chrome/browser/autofill/autofill_common_test.h" #include "chrome/browser/autofill/autofill_profile.h" #include "chrome/common/guid.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "grit/generated_resources.h" #include "testing/gtest/include/gtest/gtest.h" @@ -25,7 +24,7 @@ bool UpdateProfileLabel(AutofillProfile *profile) { } // namespace -typedef TestingBrowserProcessTest AutofillProfileTest; +typedef testing::Test AutofillProfileTest; // Tests different possibilities for summary string generation. // Based on existence of first name, last name, and address line 1. diff --git a/chrome/browser/autofill/credit_card_unittest.cc b/chrome/browser/autofill/credit_card_unittest.cc index d71a67c..62b7cea4 100644 --- a/chrome/browser/autofill/credit_card_unittest.cc +++ b/chrome/browser/autofill/credit_card_unittest.cc @@ -6,7 +6,6 @@ #include "base/utf_string_conversions.h" #include "chrome/browser/autofill/autofill_common_test.h" #include "chrome/browser/autofill/credit_card.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "testing/gtest/include/gtest/gtest.h" namespace { @@ -40,7 +39,7 @@ const char* const kInvalidNumbers[] = { } // namespace -typedef TestingBrowserProcessTest CreditCardTest; +typedef testing::Test CreditCardTest; // Tests credit card summary string generation. This test simulates a variety // of different possible summary strings. Variations occur based on the diff --git a/chrome/browser/autofill/personal_data_manager_unittest.cc b/chrome/browser/autofill/personal_data_manager_unittest.cc index 9bcf5f6..ac82140 100644 --- a/chrome/browser/autofill/personal_data_manager_unittest.cc +++ b/chrome/browser/autofill/personal_data_manager_unittest.cc @@ -81,7 +81,6 @@ class PersonalDataManagerTest : public testing::Test { MessageLoop::current()->Run(); } - ScopedTestingBrowserProcess browser_process_; MessageLoopForUI message_loop_; BrowserThread ui_thread_; BrowserThread db_thread_; diff --git a/chrome/browser/autofill/phone_number_i18n_unittest.cc b/chrome/browser/autofill/phone_number_i18n_unittest.cc index 9c938c2..8798e5b 100644 --- a/chrome/browser/autofill/phone_number_i18n_unittest.cc +++ b/chrome/browser/autofill/phone_number_i18n_unittest.cc @@ -4,7 +4,6 @@ #include "base/utf_string_conversions.h" #include "chrome/browser/autofill/phone_number_i18n.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "testing/gtest/include/gtest/gtest.h" using autofill_i18n::NormalizePhoneNumber; @@ -14,7 +13,7 @@ using autofill_i18n::FormatPhone; using autofill_i18n::ComparePhones; using autofill_i18n::PhoneNumbersMatch; -typedef TestingBrowserProcessTest PhoneNumberI18NTest; +typedef testing::Test PhoneNumberI18NTest; TEST_F(PhoneNumberI18NTest, NormalizePhoneNumber) { // "Large" digits. diff --git a/chrome/browser/autofill/select_control_handler_unittest.cc b/chrome/browser/autofill/select_control_handler_unittest.cc index c23462c..fc7577c 100644 --- a/chrome/browser/autofill/select_control_handler_unittest.cc +++ b/chrome/browser/autofill/select_control_handler_unittest.cc @@ -8,11 +8,10 @@ #include "chrome/browser/autofill/autofill_type.h" #include "chrome/browser/autofill/credit_card.h" #include "chrome/browser/autofill/select_control_handler.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "testing/gtest/include/gtest/gtest.h" #include "webkit/glue/form_field.h" -typedef TestingBrowserProcessTest SelectControlHandlerTest; +typedef testing::Test SelectControlHandlerTest; TEST_F(SelectControlHandlerTest, CreditCardMonthExact) { const char* const kMonthsNumeric[] = { diff --git a/chrome/browser/automation/automation_provider_unittest.cc b/chrome/browser/automation/automation_provider_unittest.cc index 2c1d51c..f78b9a6 100644 --- a/chrome/browser/automation/automation_provider_unittest.cc +++ b/chrome/browser/automation/automation_provider_unittest.cc @@ -4,7 +4,6 @@ #include "chrome/browser/automation/chrome_frame_automation_provider.h" #include "chrome/test/base/testing_browser_process.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "content/browser/browser_thread.h" #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" @@ -21,7 +20,7 @@ class MockChromeFrameAutomationProvider void (const IPC::Message& message)); // NOLINT }; -typedef TestingBrowserProcessTest AutomationProviderTest; +typedef testing::Test AutomationProviderTest; TEST_F(AutomationProviderTest, TestInvalidChromeFrameMessage) { MessageLoop message_loop; diff --git a/chrome/browser/background/background_contents_service_unittest.cc b/chrome/browser/background/background_contents_service_unittest.cc index 8bdc96d..b6eac81 100644 --- a/chrome/browser/background/background_contents_service_unittest.cc +++ b/chrome/browser/background/background_contents_service_unittest.cc @@ -16,13 +16,12 @@ #include "chrome/common/chrome_notification_types.h" #include "chrome/common/pref_names.h" #include "chrome/test/base/testing_browser_process.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/test/base/testing_profile.h" #include "googleurl/src/gurl.h" #include "testing/gtest/include/gtest/gtest.h" #include "testing/platform_test.h" -class BackgroundContentsServiceTest : public TestingBrowserProcessTest { +class BackgroundContentsServiceTest : public testing::Test { public: BackgroundContentsServiceTest() {} ~BackgroundContentsServiceTest() {} diff --git a/chrome/browser/background/background_mode_manager_unittest.cc b/chrome/browser/background/background_mode_manager_unittest.cc index 345fd92..41a0192 100644 --- a/chrome/browser/background/background_mode_manager_unittest.cc +++ b/chrome/browser/background/background_mode_manager_unittest.cc @@ -8,11 +8,10 @@ #include "chrome/browser/ui/browser_list.h" #include "chrome/common/chrome_switches.h" #include "chrome/test/base/testing_browser_process.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/test/base/testing_profile.h" #include "testing/gtest/include/gtest/gtest.h" -class BackgroundModeManagerTest : public TestingBrowserProcessTest { +class BackgroundModeManagerTest : public testing::Test { public: BackgroundModeManagerTest() {} ~BackgroundModeManagerTest() {} diff --git a/chrome/browser/bookmarks/bookmark_codec_unittest.cc b/chrome/browser/bookmarks/bookmark_codec_unittest.cc index 3ffc2f4..4f82460 100644 --- a/chrome/browser/bookmarks/bookmark_codec_unittest.cc +++ b/chrome/browser/bookmarks/bookmark_codec_unittest.cc @@ -14,7 +14,6 @@ #include "chrome/browser/bookmarks/bookmark_model_test_utils.h" #include "chrome/browser/bookmarks/bookmark_utils.h" #include "chrome/common/chrome_paths.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "content/common/json_value_serializer.h" #include "testing/gtest/include/gtest/gtest.h" @@ -38,7 +37,7 @@ BookmarkNode* AsMutable(const BookmarkNode* node) { } // namespace -class BookmarkCodecTest : public TestingBrowserProcessTest { +class BookmarkCodecTest : public testing::Test { protected: // Helpers to create bookmark models with different data. BookmarkModel* CreateTestModel1() { diff --git a/chrome/browser/bookmarks/bookmark_context_menu_controller_unittest.cc b/chrome/browser/bookmarks/bookmark_context_menu_controller_unittest.cc index 3d5d992..f9e8b5e 100644 --- a/chrome/browser/bookmarks/bookmark_context_menu_controller_unittest.cc +++ b/chrome/browser/bookmarks/bookmark_context_menu_controller_unittest.cc @@ -11,7 +11,6 @@ #include "chrome/browser/bookmarks/bookmark_model.h" #include "chrome/browser/bookmarks/bookmark_utils.h" #include "chrome/browser/profiles/profile.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/test/base/testing_profile.h" #include "content/browser/browser_thread.h" #include "content/browser/tab_contents/page_navigator.h" @@ -43,7 +42,7 @@ class TestingPageNavigator : public PageNavigator { std::vector<GURL> urls_; }; -class BookmarkContextMenuControllerTest : public TestingBrowserProcessTest { +class BookmarkContextMenuControllerTest : public testing::Test { public: BookmarkContextMenuControllerTest() : ui_thread_(BrowserThread::UI, &message_loop_), diff --git a/chrome/browser/bookmarks/bookmark_expanded_state_tracker_unittest.cc b/chrome/browser/bookmarks/bookmark_expanded_state_tracker_unittest.cc index 7a1f9c6..515fc3f 100644 --- a/chrome/browser/bookmarks/bookmark_expanded_state_tracker_unittest.cc +++ b/chrome/browser/bookmarks/bookmark_expanded_state_tracker_unittest.cc @@ -6,12 +6,11 @@ #include "base/utf_string_conversions.h" #include "chrome/browser/bookmarks/bookmark_model.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/test/base/testing_profile.h" #include "content/browser/browser_thread.h" #include "testing/gtest/include/gtest/gtest.h" -class BookmarkExpandedStateTrackerTest : public TestingBrowserProcessTest { +class BookmarkExpandedStateTrackerTest : public testing::Test { public: BookmarkExpandedStateTrackerTest(); diff --git a/chrome/browser/bookmarks/bookmark_html_writer_unittest.cc b/chrome/browser/bookmarks/bookmark_html_writer_unittest.cc index eba8cec..f04a4de 100644 --- a/chrome/browser/bookmarks/bookmark_html_writer_unittest.cc +++ b/chrome/browser/bookmarks/bookmark_html_writer_unittest.cc @@ -16,7 +16,6 @@ #include "chrome/browser/bookmarks/bookmark_html_writer.h" #include "chrome/browser/bookmarks/bookmark_model.h" #include "chrome/browser/importer/firefox2_importer.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/test/base/testing_profile.h" #include "content/browser/browser_thread.h" #include "grit/generated_resources.h" @@ -41,10 +40,10 @@ void MakeTestSkBitmap(int w, int h, SkBitmap* bmp) { } // namespace -class BookmarkHTMLWriterTest : public TestingBrowserProcessTest { +class BookmarkHTMLWriterTest : public testing::Test { protected: virtual void SetUp() { - TestingBrowserProcessTest::SetUp(); + testing::Test::SetUp(); ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); path_ = temp_dir_.path().AppendASCII("bookmarks.html"); } diff --git a/chrome/browser/bookmarks/bookmark_index_unittest.cc b/chrome/browser/bookmarks/bookmark_index_unittest.cc index 3adaaf3..1e7f3c9 100644 --- a/chrome/browser/bookmarks/bookmark_index_unittest.cc +++ b/chrome/browser/bookmarks/bookmark_index_unittest.cc @@ -15,12 +15,11 @@ #include "chrome/browser/bookmarks/bookmark_utils.h" #include "chrome/browser/history/history_database.h" #include "chrome/browser/history/in_memory_database.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/test/base/testing_profile.h" #include "content/browser/browser_thread.h" #include "testing/gtest/include/gtest/gtest.h" -class BookmarkIndexTest : public TestingBrowserProcessTest { +class BookmarkIndexTest : public testing::Test { public: BookmarkIndexTest() : model_(new BookmarkModel(NULL)) {} diff --git a/chrome/browser/bookmarks/bookmark_model_unittest.cc b/chrome/browser/bookmarks/bookmark_model_unittest.cc index 1d0e243..20e964f 100644 --- a/chrome/browser/bookmarks/bookmark_model_unittest.cc +++ b/chrome/browser/bookmarks/bookmark_model_unittest.cc @@ -26,7 +26,6 @@ #include "chrome/common/chrome_paths.h" #include "chrome/common/chrome_switches.h" #include "chrome/test/base/model_test_utils.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/test/base/testing_profile.h" #include "content/browser/browser_thread.h" #include "content/common/notification_details.h" @@ -52,7 +51,7 @@ void SwapDateAdded(BookmarkNode* n1, BookmarkNode* n2) { n2->set_date_added(tmp); } -class BookmarkModelTest : public TestingBrowserProcessTest, +class BookmarkModelTest : public testing::Test, public BookmarkModelObserver { public: struct ObserverDetails { @@ -694,13 +693,13 @@ void PopulateBookmarkNode(TestNode* parent, } // Test class that creates a BookmarkModel with a real history backend. -class BookmarkModelTestWithProfile : public TestingBrowserProcessTest { +class BookmarkModelTestWithProfile : public testing::Test { public: BookmarkModelTestWithProfile() : ui_thread_(BrowserThread::UI, &message_loop_), file_thread_(BrowserThread::FILE, &message_loop_) {} - // TestingBrowserProcessTest: + // testing::Test: virtual void TearDown() OVERRIDE { profile_.reset(NULL); } diff --git a/chrome/browser/bookmarks/bookmark_node_data_unittest.cc b/chrome/browser/bookmarks/bookmark_node_data_unittest.cc index 732b38e..b9c58bb 100644 --- a/chrome/browser/bookmarks/bookmark_node_data_unittest.cc +++ b/chrome/browser/bookmarks/bookmark_node_data_unittest.cc @@ -8,7 +8,6 @@ #include "base/utf_string_conversions.h" #include "chrome/browser/bookmarks/bookmark_model.h" #include "chrome/browser/bookmarks/bookmark_node_data.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/test/base/testing_profile.h" #include "content/browser/browser_thread.h" #include "googleurl/src/gurl.h" @@ -16,7 +15,7 @@ #include "ui/base/dragdrop/os_exchange_data.h" #include "ui/base/dragdrop/os_exchange_data_provider_win.h" -class BookmarkNodeDataTest : public TestingBrowserProcessTest { +class BookmarkNodeDataTest : public testing::Test { public: BookmarkNodeDataTest() : ui_thread_(BrowserThread::UI, &loop_), diff --git a/chrome/browser/bookmarks/bookmark_utils_unittest.cc b/chrome/browser/bookmarks/bookmark_utils_unittest.cc index 8f40e9c..524a4ed 100644 --- a/chrome/browser/bookmarks/bookmark_utils_unittest.cc +++ b/chrome/browser/bookmarks/bookmark_utils_unittest.cc @@ -9,14 +9,13 @@ #include "base/utf_string_conversions.h" #include "chrome/browser/bookmarks/bookmark_model.h" #include "chrome/browser/bookmarks/bookmark_utils.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "ui/base/clipboard/scoped_clipboard_writer.h" #if !defined(OS_MACOSX) #include "chrome/browser/browser_process.h" #endif -typedef TestingBrowserProcessTest BookmarkUtilsTest; +typedef testing::Test BookmarkUtilsTest; TEST_F(BookmarkUtilsTest, GetBookmarksContainingText) { BookmarkModel model(NULL); diff --git a/chrome/browser/bookmarks/recently_used_folders_combo_model_unittest.cc b/chrome/browser/bookmarks/recently_used_folders_combo_model_unittest.cc index 70dcf80..d539d8a 100644 --- a/chrome/browser/bookmarks/recently_used_folders_combo_model_unittest.cc +++ b/chrome/browser/bookmarks/recently_used_folders_combo_model_unittest.cc @@ -6,12 +6,11 @@ #include "base/memory/scoped_ptr.h" #include "base/utf_string_conversions.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/test/base/testing_profile.h" #include "content/browser/browser_thread.h" #include "testing/gtest/include/gtest/gtest.h" -class RecentlyUsedFoldersComboModelTest : public TestingBrowserProcessTest { +class RecentlyUsedFoldersComboModelTest : public testing::Test { public: RecentlyUsedFoldersComboModelTest(); diff --git a/chrome/browser/browser_about_handler_unittest.cc b/chrome/browser/browser_about_handler_unittest.cc index 6448b4c..b1c245d 100644 --- a/chrome/browser/browser_about_handler_unittest.cc +++ b/chrome/browser/browser_about_handler_unittest.cc @@ -7,13 +7,12 @@ #include "chrome/browser/browser_about_handler.h" #include "chrome/common/about_handler.h" #include "chrome/common/url_constants.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/test/base/testing_profile.h" #include "content/browser/browser_thread.h" #include "googleurl/src/gurl.h" #include "testing/gtest/include/gtest/gtest.h" -typedef TestingBrowserProcessTest BrowserAboutHandlerTest; +typedef testing::Test BrowserAboutHandlerTest; TEST_F(BrowserAboutHandlerTest, WillHandleBrowserAboutURL) { std::string chrome_prefix(chrome::kChromeUIScheme); diff --git a/chrome/browser/browsing_data_appcache_helper_unittest.cc b/chrome/browser/browsing_data_appcache_helper_unittest.cc index a5f97c9..36d4478 100644 --- a/chrome/browser/browsing_data_appcache_helper_unittest.cc +++ b/chrome/browser/browsing_data_appcache_helper_unittest.cc @@ -5,7 +5,6 @@ #include "chrome/browser/browsing_data_appcache_helper.h" #include "base/stl_util.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/test/base/testing_profile.h" #include "testing/gtest/include/gtest/gtest.h" @@ -28,7 +27,7 @@ class TestCompletionCallback { } // namespace -typedef TestingBrowserProcessTest CannedBrowsingDataAppCacheHelperTest; +typedef testing::Test CannedBrowsingDataAppCacheHelperTest; TEST_F(CannedBrowsingDataAppCacheHelperTest, SetInfo) { TestingProfile profile; diff --git a/chrome/browser/browsing_data_cookie_helper_unittest.cc b/chrome/browser/browsing_data_cookie_helper_unittest.cc index 44bc5ac..dda9b7e 100644 --- a/chrome/browser/browsing_data_cookie_helper_unittest.cc +++ b/chrome/browser/browsing_data_cookie_helper_unittest.cc @@ -8,7 +8,6 @@ #include "base/bind.h" #include "base/message_loop.h" #include "base/synchronization/waitable_event.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/test/base/testing_profile.h" #include "content/browser/browser_thread.h" #include "net/url_request/url_request_context_getter.h" @@ -16,7 +15,7 @@ namespace { -class BrowsingDataCookieHelperTest : public TestingBrowserProcessTest { +class BrowsingDataCookieHelperTest : public testing::Test { public: void SetUpOnIOThread(base::WaitableEvent* io_setup_complete) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); diff --git a/chrome/browser/browsing_data_database_helper_unittest.cc b/chrome/browser/browsing_data_database_helper_unittest.cc index 689b601..cda7591 100644 --- a/chrome/browser/browsing_data_database_helper_unittest.cc +++ b/chrome/browser/browsing_data_database_helper_unittest.cc @@ -5,13 +5,12 @@ #include "chrome/browser/browsing_data_database_helper.h" #include "base/file_util.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/test/base/testing_profile.h" #include "testing/gtest/include/gtest/gtest.h" namespace { -typedef TestingBrowserProcessTest CannedBrowsingDataDatabaseTest; +typedef testing::Test CannedBrowsingDataDatabaseTest; TEST_F(CannedBrowsingDataDatabaseTest, Empty) { TestingProfile profile; diff --git a/chrome/browser/browsing_data_file_system_helper_unittest.cc b/chrome/browser/browsing_data_file_system_helper_unittest.cc index 12facb2..19c94b9 100644 --- a/chrome/browser/browsing_data_file_system_helper_unittest.cc +++ b/chrome/browser/browsing_data_file_system_helper_unittest.cc @@ -6,7 +6,6 @@ #include "base/utf_string_conversions.h" #include "chrome/browser/browsing_data_file_system_helper.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/test/base/testing_profile.h" #include "content/browser/browser_thread.h" #include "webkit/fileapi/file_system_context.h" @@ -46,7 +45,7 @@ typedef scoped_ptr<FileSystemInfoList> ScopedFileSystemInfoList; // called. For this to work, you'll need to ensure that each async call is // implemented as a class method that that calls Notify() at an appropriate // point. -class BrowsingDataFileSystemHelperTest : public TestingBrowserProcessTest { +class BrowsingDataFileSystemHelperTest : public testing::Test { public: BrowsingDataFileSystemHelperTest() : helper_(BrowsingDataFileSystemHelper::Create(&profile_)), diff --git a/chrome/browser/browsing_data_indexed_db_helper_unittest.cc b/chrome/browser/browsing_data_indexed_db_helper_unittest.cc index a3304e5..da7aeb3 100644 --- a/chrome/browser/browsing_data_indexed_db_helper_unittest.cc +++ b/chrome/browser/browsing_data_indexed_db_helper_unittest.cc @@ -6,11 +6,11 @@ #include "base/utf_string_conversions.h" #include "chrome/browser/browsing_data_indexed_db_helper.h" -#include "chrome/test/base/testing_browser_process_test.h" +#include "chrome/test/base/testing_profile.h" namespace { -typedef TestingBrowserProcessTest CannedBrowsingDataIndexedDBHelperTest; +typedef testing::Test CannedBrowsingDataIndexedDBHelperTest; TEST_F(CannedBrowsingDataIndexedDBHelperTest, Empty) { const GURL origin("http://host1:1/"); diff --git a/chrome/browser/browsing_data_local_storage_helper_unittest.cc b/chrome/browser/browsing_data_local_storage_helper_unittest.cc index 15df10a..bbad720 100644 --- a/chrome/browser/browsing_data_local_storage_helper_unittest.cc +++ b/chrome/browser/browsing_data_local_storage_helper_unittest.cc @@ -4,13 +4,12 @@ #include "chrome/browser/browsing_data_local_storage_helper.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/test/base/testing_profile.h" #include "testing/gtest/include/gtest/gtest.h" namespace { -typedef TestingBrowserProcessTest CannedBrowsingDataLocalStorageTest; +typedef testing::Test CannedBrowsingDataLocalStorageTest; TEST_F(CannedBrowsingDataLocalStorageTest, Empty) { TestingProfile profile; diff --git a/chrome/browser/browsing_data_remover_unittest.cc b/chrome/browser/browsing_data_remover_unittest.cc index 7080d37..6814840 100644 --- a/chrome/browser/browsing_data_remover_unittest.cc +++ b/chrome/browser/browsing_data_remover_unittest.cc @@ -10,7 +10,6 @@ #include "base/platform_file.h" #include "chrome/browser/extensions/mock_extension_special_storage_policy.h" #include "chrome/browser/history/history.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/test/base/testing_profile.h" #include "testing/gtest/include/gtest/gtest.h" #include "webkit/fileapi/file_system_context.h" @@ -151,7 +150,7 @@ class RemoveQuotaManagedDataTester : public BrowsingDataRemoverTester { // Test Class ---------------------------------------------------------------- -class BrowsingDataRemoverTest : public TestingBrowserProcessTest { +class BrowsingDataRemoverTest : public testing::Test { public: BrowsingDataRemoverTest() : ui_thread_(BrowserThread::UI, &message_loop_), diff --git a/chrome/browser/chromeos/input_method/input_method_util_unittest.cc b/chrome/browser/chromeos/input_method/input_method_util_unittest.cc index 9befa0f..a49f155 100644 --- a/chrome/browser/chromeos/input_method/input_method_util_unittest.cc +++ b/chrome/browser/chromeos/input_method/input_method_util_unittest.cc @@ -8,7 +8,6 @@ #include "base/utf_string_conversions.h" #include "chrome/browser/chromeos/cros/cros_library.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "grit/generated_resources.h" #include "testing/gtest/include/gtest/gtest.h" #include "ui/base/l10n/l10n_util.h" @@ -25,7 +24,7 @@ InputMethodDescriptor GetDesc(const std::string& id, } } // namespace -class InputMethodUtilTest : public TestingBrowserProcessTest { +class InputMethodUtilTest : public testing::Test { public: static void SetUpTestCase() { // Reload the internal maps before running tests, with the stub diff --git a/chrome/browser/chromeos/login/cookie_fetcher_unittest.cc b/chrome/browser/chromeos/login/cookie_fetcher_unittest.cc index a75b7ac..c27e0e7 100644 --- a/chrome/browser/chromeos/login/cookie_fetcher_unittest.cc +++ b/chrome/browser/chromeos/login/cookie_fetcher_unittest.cc @@ -11,7 +11,6 @@ #include "chrome/browser/chromeos/login/issue_response_handler.h" #include "chrome/browser/chromeos/login/mock_auth_response_handler.h" #include "chrome/common/net/gaia/gaia_urls.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/test/base/testing_profile.h" #include "content/browser/browser_thread.h" #include "content/common/url_fetcher.h" @@ -26,7 +25,7 @@ using ::testing::Invoke; using ::testing::Unused; using ::testing::_; -class CookieFetcherTest : public TestingBrowserProcessTest { +class CookieFetcherTest : public testing::Test { public: CookieFetcherTest() : iat_url_(GaiaUrls::GetInstance()->issue_auth_token_url()), diff --git a/chrome/browser/chromeos/login/google_authenticator_unittest.cc b/chrome/browser/chromeos/login/google_authenticator_unittest.cc index b3a9cae..75bc201 100644 --- a/chrome/browser/chromeos/login/google_authenticator_unittest.cc +++ b/chrome/browser/chromeos/login/google_authenticator_unittest.cc @@ -26,7 +26,6 @@ #include "chrome/common/chrome_paths.h" #include "chrome/common/net/gaia/gaia_auth_fetcher_unittest.h" #include "chrome/common/net/gaia/gaia_urls.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/test/base/testing_profile.h" #include "content/browser/browser_thread.h" #include "content/common/url_fetcher.h" @@ -51,7 +50,7 @@ using ::testing::_; namespace chromeos { -class GoogleAuthenticatorTest : public TestingBrowserProcessTest { +class GoogleAuthenticatorTest : public testing::Test { public: GoogleAuthenticatorTest() : message_loop_ui_(MessageLoop::TYPE_UI), diff --git a/chrome/browser/chromeos/login/online_attempt_unittest.cc b/chrome/browser/chromeos/login/online_attempt_unittest.cc index b861b50..f71309c 100644 --- a/chrome/browser/chromeos/login/online_attempt_unittest.cc +++ b/chrome/browser/chromeos/login/online_attempt_unittest.cc @@ -15,7 +15,6 @@ #include "chrome/browser/chromeos/login/test_attempt_state.h" #include "chrome/common/net/gaia/gaia_auth_consumer.h" #include "chrome/common/net/gaia/gaia_auth_fetcher_unittest.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/test/base/testing_profile.h" #include "content/browser/browser_thread.h" #include "googleurl/src/gurl.h" @@ -29,7 +28,7 @@ using ::testing::_; namespace chromeos { -class OnlineAttemptTest : public TestingBrowserProcessTest { +class OnlineAttemptTest : public testing::Test { public: OnlineAttemptTest() : message_loop_(MessageLoop::TYPE_UI), diff --git a/chrome/browser/chromeos/login/owner_manager_unittest.cc b/chrome/browser/chromeos/login/owner_manager_unittest.cc index dd43817..f9a0e0b 100644 --- a/chrome/browser/chromeos/login/owner_manager_unittest.cc +++ b/chrome/browser/chromeos/login/owner_manager_unittest.cc @@ -13,7 +13,6 @@ #include "base/scoped_temp_dir.h" #include "chrome/browser/chromeos/login/mock_owner_key_utils.h" #include "chrome/common/chrome_notification_types.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "content/browser/browser_thread.h" #include "crypto/nss_util.h" #include "crypto/rsa_private_key.h" @@ -119,7 +118,7 @@ void MockSigner::OnKeyOpComplete(const OwnerManager::KeyOpCode return_code, //////////////////////////////////////////////////////////////////////////////// // OwnerManagerTest -class OwnerManagerTest : public TestingBrowserProcessTest { +class OwnerManagerTest : public testing::Test { public: OwnerManagerTest() : message_loop_(MessageLoop::TYPE_UI), diff --git a/chrome/browser/chromeos/login/ownership_service_unittest.cc b/chrome/browser/chromeos/login/ownership_service_unittest.cc index 801a2c8..fea5464 100644 --- a/chrome/browser/chromeos/login/ownership_service_unittest.cc +++ b/chrome/browser/chromeos/login/ownership_service_unittest.cc @@ -13,7 +13,6 @@ #include "base/scoped_temp_dir.h" #include "chrome/browser/chromeos/login/mock_owner_key_utils.h" #include "chrome/browser/chromeos/login/owner_manager_unittest.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "content/browser/browser_thread.h" #include "crypto/nss_util.h" #include "crypto/rsa_private_key.h" @@ -31,7 +30,7 @@ using ::testing::_; namespace chromeos { -class OwnershipServiceTest : public TestingBrowserProcessTest { +class OwnershipServiceTest : public testing::Test { public: OwnershipServiceTest() : message_loop_(MessageLoop::TYPE_UI), diff --git a/chrome/browser/chromeos/login/parallel_authenticator_unittest.cc b/chrome/browser/chromeos/login/parallel_authenticator_unittest.cc index 8954f8f..c68e948 100644 --- a/chrome/browser/chromeos/login/parallel_authenticator_unittest.cc +++ b/chrome/browser/chromeos/login/parallel_authenticator_unittest.cc @@ -23,7 +23,6 @@ #include "chrome/browser/chromeos/login/test_attempt_state.h" #include "chrome/common/chrome_paths.h" #include "chrome/common/net/gaia/gaia_auth_fetcher_unittest.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/test/base/testing_profile.h" #include "content/browser/browser_thread.h" #include "content/common/url_fetcher.h" @@ -79,7 +78,7 @@ class TestOnlineAttempt : public OnlineAttempt { } }; -class ParallelAuthenticatorTest : public TestingBrowserProcessTest { +class ParallelAuthenticatorTest : public testing::Test { public: ParallelAuthenticatorTest() : message_loop_(MessageLoop::TYPE_UI), diff --git a/chrome/browser/chromeos/login/signed_settings_helper_unittest.cc b/chrome/browser/chromeos/login/signed_settings_helper_unittest.cc index 6715d9f..8de228c 100644 --- a/chrome/browser/chromeos/login/signed_settings_helper_unittest.cc +++ b/chrome/browser/chromeos/login/signed_settings_helper_unittest.cc @@ -11,7 +11,6 @@ #include "chrome/browser/chromeos/login/signed_settings.h" #include "chrome/browser/policy/proto/chrome_device_policy.pb.h" #include "chrome/browser/policy/proto/device_management_backend.pb.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "content/browser/browser_thread.h" #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" @@ -47,7 +46,7 @@ class MockSignedSettingsHelperCallback : public SignedSettingsHelper::Callback { const std::string& value)); }; -class SignedSettingsHelperTest : public TestingBrowserProcessTest, +class SignedSettingsHelperTest : public testing::Test, public SignedSettingsHelper::TestDelegate { public: SignedSettingsHelperTest() diff --git a/chrome/browser/chromeos/login/signed_settings_temp_storage_unittest.cc b/chrome/browser/chromeos/login/signed_settings_temp_storage_unittest.cc index 7ee4ec0..6bcefaa 100644 --- a/chrome/browser/chromeos/login/signed_settings_temp_storage_unittest.cc +++ b/chrome/browser/chromeos/login/signed_settings_temp_storage_unittest.cc @@ -14,12 +14,11 @@ #include "base/scoped_temp_dir.h" #include "chrome/browser/prefs/pref_service.h" #include "chrome/common/logging_chrome.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "testing/gtest/include/gtest/gtest.h" namespace chromeos { -class SignedSettingsTempStorageTest : public TestingBrowserProcessTest { +class SignedSettingsTempStorageTest : public testing::Test { protected: virtual void SetUp() { ref_map_["some_stuff"] = "a=35;code=64"; diff --git a/chrome/browser/chromeos/login/signed_settings_unittest.cc b/chrome/browser/chromeos/login/signed_settings_unittest.cc index 0177fbc..495b1f5 100644 --- a/chrome/browser/chromeos/login/signed_settings_unittest.cc +++ b/chrome/browser/chromeos/login/signed_settings_unittest.cc @@ -17,7 +17,6 @@ #include "chrome/browser/chromeos/login/owner_manager_unittest.h" #include "chrome/browser/policy/proto/chrome_device_policy.pb.h" #include "chrome/browser/policy/proto/device_management_backend.pb.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "content/browser/browser_thread.h" #include "crypto/rsa_private_key.h" #include "testing/gmock/include/gmock/gmock.h" @@ -99,7 +98,7 @@ class ProtoDelegate : public DummyDelegate<const em::PolicyFetchResponse&> { } // anonymous namespace -class SignedSettingsTest : public TestingBrowserProcessTest { +class SignedSettingsTest : public testing::Test { public: SignedSettingsTest() : fake_email_("fakey@example.com"), diff --git a/chrome/browser/chromeos/login/user_controller_unittest.cc b/chrome/browser/chromeos/login/user_controller_unittest.cc index ff86810..74642fc2 100644 --- a/chrome/browser/chromeos/login/user_controller_unittest.cc +++ b/chrome/browser/chromeos/login/user_controller_unittest.cc @@ -29,7 +29,6 @@ TEST(UserControllerTest, GetNameTooltipExistingUser) { // We need to have NotificationService and g_browser_process initialized // before we create UserController for existing user. // Otherwise we crash with either SEGFAULT or DCHECK. - ScopedTestingBrowserProcess browser_process; UserManager::User existing_user; existing_user.set_email("someordinaryuser@domain.com"); UserController existing_user_controller(NULL, existing_user); diff --git a/chrome/browser/chromeos/notifications/desktop_notifications_unittest.h b/chrome/browser/chromeos/notifications/desktop_notifications_unittest.h index a93b1d8..952ddbf 100644 --- a/chrome/browser/chromeos/notifications/desktop_notifications_unittest.h +++ b/chrome/browser/chromeos/notifications/desktop_notifications_unittest.h @@ -19,7 +19,6 @@ #include "chrome/browser/notifications/notification_ui_manager.h" #include "chrome/browser/notifications/notifications_prefs_cache.h" #include "chrome/browser/ui/browser_list.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/test/base/testing_pref_service.h" #include "chrome/test/base/testing_profile.h" #include "content/browser/browser_thread.h" @@ -58,7 +57,7 @@ class MockBalloonCollection : public BalloonCollectionImpl { std::set<Balloon*> balloons_; }; -class DesktopNotificationsTest : public TestingBrowserProcessTest { +class DesktopNotificationsTest : public testing::Test { public: DesktopNotificationsTest(); virtual ~DesktopNotificationsTest(); diff --git a/chrome/browser/chromeos/status/input_method_menu_unittest.cc b/chrome/browser/chromeos/status/input_method_menu_unittest.cc index ef677b3..f8674de 100644 --- a/chrome/browser/chromeos/status/input_method_menu_unittest.cc +++ b/chrome/browser/chromeos/status/input_method_menu_unittest.cc @@ -112,7 +112,6 @@ TEST(InputMethodMenuTest, GetTextForIndicatorTest) { // Test whether the function returns language name for non-ambiguous languages. TEST(InputMethodMenuTest, GetTextForMenuTest) { - ScopedTestingBrowserProcess browser_process; // For most languages input method or keyboard layout name is returned. // See below for exceptions. { diff --git a/chrome/browser/component_updater/component_updater_service_unittest.cc b/chrome/browser/component_updater/component_updater_service_unittest.cc index ff7eb80..6508a4e 100644 --- a/chrome/browser/component_updater/component_updater_service_unittest.cc +++ b/chrome/browser/component_updater/component_updater_service_unittest.cc @@ -14,7 +14,6 @@ #include "chrome/common/chrome_notification_types.h" #include "chrome/test/base/test_notification_tracker.h" #include "chrome/test/base/test_url_request_context_getter.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "content/browser/browser_thread.h" #include "content/common/notification_observer.h" #include "content/common/notification_service.h" @@ -120,7 +119,7 @@ const char header_ok_reply[] = } // namespace // Common fixture for all the component updater tests. -class ComponentUpdaterTest : public TestingBrowserProcessTest { +class ComponentUpdaterTest : public testing::Test { public: ComponentUpdaterTest() : component_updater_(NULL), test_config_(NULL) { // The component updater instance under test. diff --git a/chrome/browser/content_settings/content_settings_policy_provider_unittest.cc b/chrome/browser/content_settings/content_settings_policy_provider_unittest.cc index 9a24e95..7180727 100644 --- a/chrome/browser/content_settings/content_settings_policy_provider_unittest.cc +++ b/chrome/browser/content_settings/content_settings_policy_provider_unittest.cc @@ -13,7 +13,6 @@ #include "chrome/common/chrome_switches.h" #include "chrome/common/pref_names.h" #include "chrome/common/url_constants.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/test/base/testing_pref_service.h" #include "chrome/test/base/testing_profile.h" #include "content/browser/browser_thread.h" @@ -24,7 +23,7 @@ using ::testing::_; namespace content_settings { -class PolicyDefaultProviderTest : public TestingBrowserProcessTest { +class PolicyDefaultProviderTest : public testing::Test { public: PolicyDefaultProviderTest() : ui_thread_(BrowserThread::UI, &message_loop_) { @@ -141,7 +140,7 @@ TEST_F(PolicyDefaultProviderTest, AutoSelectCertificate) { provider.ShutdownOnUIThread(); } -class PolicyProviderTest : public TestingBrowserProcessTest { +class PolicyProviderTest : public testing::Test { public: PolicyProviderTest() : ui_thread_(BrowserThread::UI, &message_loop_) { diff --git a/chrome/browser/content_settings/content_settings_pref_provider_unittest.cc b/chrome/browser/content_settings/content_settings_pref_provider_unittest.cc index c63632f..01177c1 100644 --- a/chrome/browser/content_settings/content_settings_pref_provider_unittest.cc +++ b/chrome/browser/content_settings/content_settings_pref_provider_unittest.cc @@ -17,7 +17,6 @@ #include "chrome/common/chrome_switches.h" #include "chrome/common/pref_names.h" #include "chrome/common/url_constants.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/test/base/testing_pref_service.h" #include "chrome/test/base/testing_profile.h" #include "content/browser/browser_thread.h" @@ -47,7 +46,7 @@ void ExpectObsoleteGeolocationSetting( namespace content_settings { -class PrefDefaultProviderTest : public TestingBrowserProcessTest { +class PrefDefaultProviderTest : public testing::Test { public: PrefDefaultProviderTest() : ui_thread_(BrowserThread::UI, &message_loop_), @@ -216,7 +215,7 @@ bool SettingsEqual(const ContentSettings& settings1, return true; } -class PrefProviderTest : public TestingBrowserProcessTest { +class PrefProviderTest : public testing::Test { public: PrefProviderTest() : ui_thread_( BrowserThread::UI, &message_loop_) { diff --git a/chrome/browser/content_settings/host_content_settings_map_unittest.cc b/chrome/browser/content_settings/host_content_settings_map_unittest.cc index fb9aa25..3cee467 100644 --- a/chrome/browser/content_settings/host_content_settings_map_unittest.cc +++ b/chrome/browser/content_settings/host_content_settings_map_unittest.cc @@ -14,7 +14,6 @@ #include "chrome/common/chrome_switches.h" #include "chrome/common/pref_names.h" #include "chrome/common/url_constants.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/test/base/testing_pref_service.h" #include "chrome/test/base/testing_profile.h" #include "googleurl/src/gurl.h" @@ -40,7 +39,7 @@ bool SettingsEqual(const ContentSettings& settings1, } // namespace -class HostContentSettingsMapTest : public TestingBrowserProcessTest { +class HostContentSettingsMapTest : public testing::Test { public: HostContentSettingsMapTest() : ui_thread_(BrowserThread::UI, &message_loop_) { } diff --git a/chrome/browser/cookies_tree_model_unittest.cc b/chrome/browser/cookies_tree_model_unittest.cc index 2ff88ca..65cb895 100644 --- a/chrome/browser/cookies_tree_model_unittest.cc +++ b/chrome/browser/cookies_tree_model_unittest.cc @@ -15,7 +15,6 @@ #include "chrome/browser/mock_browsing_data_indexed_db_helper.h" #include "chrome/browser/mock_browsing_data_quota_helper.h" #include "chrome/browser/mock_browsing_data_local_storage_helper.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/test/base/testing_profile.h" #include "content/common/content_notification_types.h" #include "content/common/notification_details.h" @@ -29,7 +28,7 @@ using ::testing::_; namespace { -class CookiesTreeModelTest : public TestingBrowserProcessTest { +class CookiesTreeModelTest : public testing::Test { public: CookiesTreeModelTest() : ui_thread_(BrowserThread::UI, &message_loop_), io_thread_(BrowserThread::IO, &message_loop_) { diff --git a/chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc b/chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc index e952449..74dda7e 100644 --- a/chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc +++ b/chrome/browser/custom_handlers/protocol_handler_registry_unittest.cc @@ -13,7 +13,6 @@ #include "chrome/common/chrome_notification_types.h" #include "chrome/common/custom_handlers/protocol_handler.h" #include "chrome/test/base/testing_browser_process.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/test/base/testing_pref_service.h" #include "chrome/test/base/testing_profile.h" #include "content/browser/browser_thread.h" @@ -187,7 +186,7 @@ class QueryProtocolHandlerOnChange : public NotificationObserver { NotificationRegistrar notification_registrar_; }; -class ProtocolHandlerRegistryTest : public TestingBrowserProcessTest { +class ProtocolHandlerRegistryTest : public testing::Test { protected: ProtocolHandlerRegistryTest() : test_protocol_handler_(CreateProtocolHandler("test", "test")) {} diff --git a/chrome/browser/download/download_manager_unittest.cc b/chrome/browser/download/download_manager_unittest.cc index 36849eb..58c39fa 100644 --- a/chrome/browser/download/download_manager_unittest.cc +++ b/chrome/browser/download/download_manager_unittest.cc @@ -20,7 +20,6 @@ #include "chrome/browser/download/download_util.h" #include "chrome/browser/prefs/pref_service.h" #include "chrome/common/pref_names.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/test/base/testing_profile.h" #include "content/browser/browser_thread.h" #include "content/browser/download/download_create_info.h" @@ -37,7 +36,7 @@ #include "ui/base/l10n/l10n_util.h" #include "ui/base/text/bytes_formatting.h" -class DownloadManagerTest : public TestingBrowserProcessTest { +class DownloadManagerTest : public testing::Test { public: static const char* kTestData; static const size_t kTestDataLen; diff --git a/chrome/browser/download/download_safe_browsing_client_unittest.cc b/chrome/browser/download/download_safe_browsing_client_unittest.cc index 2cccce6..05bc36e 100644 --- a/chrome/browser/download/download_safe_browsing_client_unittest.cc +++ b/chrome/browser/download/download_safe_browsing_client_unittest.cc @@ -5,7 +5,6 @@ #include "base/message_loop.h" #include "chrome/browser/download/download_safe_browsing_client.h" #include "chrome/browser/safe_browsing/safe_browsing_service.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "content/browser/browser_thread.h" #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" @@ -32,7 +31,7 @@ class MockSafeBrowsingService : public SafeBrowsingService { } // namespace -class DownloadSBClientTest : public TestingBrowserProcessTest { +class DownloadSBClientTest : public testing::Test { public: DownloadSBClientTest() : ui_thread_(BrowserThread::UI, &loop_) { diff --git a/chrome/browser/extensions/apps_promo_unittest.cc b/chrome/browser/extensions/apps_promo_unittest.cc index accfd5b..607da43 100644 --- a/chrome/browser/extensions/apps_promo_unittest.cc +++ b/chrome/browser/extensions/apps_promo_unittest.cc @@ -3,12 +3,13 @@ // found in the LICENSE file. #include "base/logging.h" +#include "chrome/browser/browser_process.h" #include "chrome/browser/extensions/apps_promo.h" #include "chrome/browser/prefs/browser_prefs.h" #include "chrome/browser/ui/webui/ntp/shown_sections_handler.h" #include "chrome/common/extensions/extension.h" #include "chrome/common/pref_names.h" -#include "chrome/test/base/testing_browser_process_test.h" +#include "chrome/test/base/testing_browser_process.h" #include "chrome/test/base/testing_pref_service.h" #include "googleurl/src/gurl.h" #include "testing/gtest/include/gtest/gtest.h" @@ -42,7 +43,7 @@ void ExpectAppsPromoHidden(PrefService* prefs) { } // namespace -class ExtensionAppsPromo : public TestingBrowserProcessTest { +class ExtensionAppsPromo : public testing::Test { public: TestingPrefService* prefs() { return &prefs_; } AppsPromo* apps_promo() { return &apps_promo_; } @@ -60,7 +61,7 @@ class ExtensionAppsPromo : public TestingBrowserProcessTest { }; ExtensionAppsPromo::ExtensionAppsPromo() - : local_state_(testing_browser_process_.get()), + : local_state_(static_cast<TestingBrowserProcess*>(g_browser_process)), apps_promo_(&prefs_) { } diff --git a/chrome/browser/extensions/extension_bookmarks_unittest.cc b/chrome/browser/extensions/extension_bookmarks_unittest.cc index 60c07f7..3ff5dc8 100644 --- a/chrome/browser/extensions/extension_bookmarks_unittest.cc +++ b/chrome/browser/extensions/extension_bookmarks_unittest.cc @@ -9,11 +9,10 @@ #include "chrome/browser/bookmarks/bookmark_model.h" #include "chrome/browser/extensions/extension_bookmark_helpers.h" #include "chrome/browser/extensions/extension_bookmarks_module_constants.h" -#include "chrome/test/base/testing_browser_process_test.h" namespace keys = extension_bookmarks_module_constants; -class ExtensionBookmarksTest : public TestingBrowserProcessTest { +class ExtensionBookmarksTest : public testing::Test { public: virtual void SetUp() { model_.reset(new BookmarkModel(NULL)); diff --git a/chrome/browser/extensions/extension_cookies_unittest.cc b/chrome/browser/extensions/extension_cookies_unittest.cc index 4b65c7b..699c5e9 100644 --- a/chrome/browser/extensions/extension_cookies_unittest.cc +++ b/chrome/browser/extensions/extension_cookies_unittest.cc @@ -10,7 +10,6 @@ #include "base/values.h" #include "chrome/browser/extensions/extension_cookies_api_constants.h" #include "chrome/browser/extensions/extension_cookies_helpers.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/test/base/testing_profile.h" #include "googleurl/src/gurl.h" @@ -62,7 +61,7 @@ class OtrTestingProfile : public TestingProfile { } // namespace -class ExtensionCookiesTest : public TestingBrowserProcessTest { +class ExtensionCookiesTest : public testing::Test { }; TEST_F(ExtensionCookiesTest, StoreIdProfileConversion) { diff --git a/chrome/browser/extensions/extension_event_router_forwarder_unittest.cc b/chrome/browser/extensions/extension_event_router_forwarder_unittest.cc index 1a9bd69..beaac8f 100644 --- a/chrome/browser/extensions/extension_event_router_forwarder_unittest.cc +++ b/chrome/browser/extensions/extension_event_router_forwarder_unittest.cc @@ -8,7 +8,7 @@ #include "base/system_monitor/system_monitor.h" #include "base/test/thread_test_helper.h" #include "chrome/browser/profiles/profile_manager.h" -#include "chrome/test/base/testing_browser_process_test.h" +#include "chrome/test/base/testing_browser_process.h" #include "chrome/test/base/testing_profile.h" #include "content/browser/browser_thread.h" #include "googleurl/src/gurl.h" @@ -32,7 +32,7 @@ class MockExtensionEventRouterForwarder : public ExtensionEventRouterForwarder { } // namespace -class ExtensionEventRouterForwarderTest : public TestingBrowserProcessTest { +class ExtensionEventRouterForwarderTest : public testing::Test { protected: ExtensionEventRouterForwarderTest() : ui_thread_(BrowserThread::UI, &message_loop_), @@ -50,7 +50,8 @@ class ExtensionEventRouterForwarderTest : public TestingBrowserProcessTest { // Inject a BrowserProcess with a ProfileManager. ASSERT_TRUE(io_thread_.Start()); - TestingBrowserProcess* browser_process = testing_browser_process_.get(); + TestingBrowserProcess* browser_process = + static_cast<TestingBrowserProcess*>(g_browser_process); browser_process->SetProfileManager(new ProfileManager); profile1_ = new TestingProfile(); diff --git a/chrome/browser/extensions/extension_icon_manager_unittest.cc b/chrome/browser/extensions/extension_icon_manager_unittest.cc index 64bbd61..a607704 100644 --- a/chrome/browser/extensions/extension_icon_manager_unittest.cc +++ b/chrome/browser/extensions/extension_icon_manager_unittest.cc @@ -9,7 +9,6 @@ #include "chrome/common/chrome_paths.h" #include "chrome/common/extensions/extension.h" #include "chrome/common/extensions/extension_resource.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "content/browser/browser_thread.h" #include "content/common/json_value_serializer.h" #include "testing/gtest/include/gtest/gtest.h" @@ -17,7 +16,7 @@ // Our test class that takes care of managing the necessary threads for loading // extension icons, and waiting for those loads to happen. -class ExtensionIconManagerTest : public TestingBrowserProcessTest { +class ExtensionIconManagerTest : public testing::Test { public: ExtensionIconManagerTest() : unwaited_image_loads_(0), diff --git a/chrome/browser/extensions/extension_menu_manager_unittest.cc b/chrome/browser/extensions/extension_menu_manager_unittest.cc index a70ce42..bb834cb 100644 --- a/chrome/browser/extensions/extension_menu_manager_unittest.cc +++ b/chrome/browser/extensions/extension_menu_manager_unittest.cc @@ -17,7 +17,6 @@ #include "chrome/common/chrome_paths.h" #include "chrome/common/extensions/extension.h" #include "chrome/common/extensions/extension_constants.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/test/base/testing_profile.h" #include "content/browser/browser_thread.h" #include "content/common/notification_service.h" @@ -31,7 +30,7 @@ using testing::Return; using testing::SaveArg; // Base class for tests. -class ExtensionMenuManagerTest : public TestingBrowserProcessTest { +class ExtensionMenuManagerTest : public testing::Test { public: ExtensionMenuManagerTest() : ui_thread_(BrowserThread::UI, &message_loop_), diff --git a/chrome/browser/extensions/extension_prefs_unittest.cc b/chrome/browser/extensions/extension_prefs_unittest.cc index fd4da68..f9a552a 100644 --- a/chrome/browser/extensions/extension_prefs_unittest.cc +++ b/chrome/browser/extensions/extension_prefs_unittest.cc @@ -15,7 +15,6 @@ #include "chrome/common/chrome_paths.h" #include "chrome/common/extensions/extension_constants.h" #include "chrome/common/extensions/extension_permission_set.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "content/browser/browser_thread.h" #include "content/common/notification_details.h" #include "content/common/notification_observer_mock.h" @@ -46,7 +45,7 @@ static void AddPattern(URLPatternSet* extent, const std::string& pattern) { } // Base class for tests. -class ExtensionPrefsTest : public TestingBrowserProcessTest { +class ExtensionPrefsTest : public testing::Test { public: ExtensionPrefsTest() : ui_thread_(BrowserThread::UI, &message_loop_), diff --git a/chrome/browser/extensions/extension_process_manager_unittest.cc b/chrome/browser/extensions/extension_process_manager_unittest.cc index 86da922..4f7aef2 100644 --- a/chrome/browser/extensions/extension_process_manager_unittest.cc +++ b/chrome/browser/extensions/extension_process_manager_unittest.cc @@ -4,7 +4,6 @@ #include "chrome/browser/extensions/extension_process_manager.h" #include "chrome/browser/extensions/extension_error_reporter.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/test/base/testing_profile.h" #include "content/browser/site_instance.h" #include "testing/gtest/include/gtest/gtest.h" @@ -13,7 +12,7 @@ namespace { // make the test a PlatformTest to setup autorelease pools properly on mac -class ExtensionProcessManagerTest : public TestingBrowserProcessTest { +class ExtensionProcessManagerTest : public testing::Test { public: static void SetUpTestCase() { ExtensionErrorReporter::Init(false); // no noisy errors diff --git a/chrome/browser/extensions/extension_service_unittest.cc b/chrome/browser/extensions/extension_service_unittest.cc index bd19cd6..23ae310 100644 --- a/chrome/browser/extensions/extension_service_unittest.cc +++ b/chrome/browser/extensions/extension_service_unittest.cc @@ -3306,8 +3306,6 @@ class ExtensionsReadyRecorder : public NotificationObserver { // Also tests that we always fire EXTENSIONS_READY, no matter whether we are // enabled or not. TEST(ExtensionServiceTestSimple, Enabledness) { - ScopedTestingBrowserProcess browser_process; - ExtensionErrorReporter::Init(false); // no noisy errors ExtensionsReadyRecorder recorder; scoped_ptr<TestingProfile> profile(new TestingProfile()); diff --git a/chrome/browser/extensions/extension_service_unittest.h b/chrome/browser/extensions/extension_service_unittest.h index 127dac3..847fda5 100644 --- a/chrome/browser/extensions/extension_service_unittest.h +++ b/chrome/browser/extensions/extension_service_unittest.h @@ -12,11 +12,10 @@ #include "base/message_loop.h" #include "base/scoped_temp_dir.h" #include "chrome/browser/extensions/extension_service.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "content/browser/browser_thread.h" #include "testing/gtest/include/gtest/gtest.h" -class ExtensionServiceTestBase : public TestingBrowserProcessTest { +class ExtensionServiceTestBase : public testing::Test { public: ExtensionServiceTestBase(); virtual ~ExtensionServiceTestBase(); diff --git a/chrome/browser/extensions/extension_updater_unittest.cc b/chrome/browser/extensions/extension_updater_unittest.cc index 572182a..98a09d7 100644 --- a/chrome/browser/extensions/extension_updater_unittest.cc +++ b/chrome/browser/extensions/extension_updater_unittest.cc @@ -25,7 +25,6 @@ #include "chrome/common/extensions/extension.h" #include "chrome/common/extensions/extension_constants.h" #include "chrome/common/pref_names.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/test/base/testing_profile.h" #include "content/browser/browser_thread.h" #include "content/test/test_url_fetcher_factory.h" @@ -287,7 +286,7 @@ static void ExtractParameters(const std::string& params, // All of our tests that need to use private APIs of ExtensionUpdater live // inside this class (which is a friend to ExtensionUpdater). -class ExtensionUpdaterTest : public TestingBrowserProcessTest { +class ExtensionUpdaterTest : public testing::Test { public: static void SimulateTimerFired(ExtensionUpdater* updater) { EXPECT_TRUE(updater->timer_.IsRunning()); diff --git a/chrome/browser/extensions/extension_webrequest_api_unittest.cc b/chrome/browser/extensions/extension_webrequest_api_unittest.cc index 8398433..012d865 100644 --- a/chrome/browser/extensions/extension_webrequest_api_unittest.cc +++ b/chrome/browser/extensions/extension_webrequest_api_unittest.cc @@ -15,7 +15,6 @@ #include "chrome/common/extensions/extension_messages.h" #include "chrome/common/pref_names.h" #include "chrome/test/base/testing_browser_process.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/test/base/testing_pref_service.h" #include "chrome/test/base/testing_profile.h" #include "content/common/json_value_serializer.h" @@ -78,7 +77,7 @@ class TestIPCSender : public IPC::Message::Sender { SentMessages sent_messages_; }; -class ExtensionWebRequestTest : public TestingBrowserProcessTest { +class ExtensionWebRequestTest : public testing::Test { protected: virtual void SetUp() { event_router_ = new ExtensionEventRouterForwarder(); @@ -335,7 +334,6 @@ class ExtensionWebRequestHeaderModificationTest : context_->set_network_delegate(network_delegate_.get()); } - ScopedTestingBrowserProcess browser_process_; MessageLoopForIO io_loop_; TestingProfile profile_; TestDelegate delegate_; diff --git a/chrome/browser/extensions/external_policy_extension_loader_unittest.cc b/chrome/browser/extensions/external_policy_extension_loader_unittest.cc index 1598b62..5ac03b1 100644 --- a/chrome/browser/extensions/external_policy_extension_loader_unittest.cc +++ b/chrome/browser/extensions/external_policy_extension_loader_unittest.cc @@ -13,13 +13,12 @@ #include "chrome/browser/extensions/external_policy_extension_loader.h" #include "chrome/common/extensions/extension.h" #include "chrome/common/pref_names.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/test/base/testing_pref_service.h" #include "chrome/test/base/testing_profile.h" #include "content/browser/browser_thread.h" #include "testing/gtest/include/gtest/gtest.h" -class ExternalPolicyExtensionProviderTest : public TestingBrowserProcessTest { +class ExternalPolicyExtensionProviderTest : public testing::Test { public: ExternalPolicyExtensionProviderTest() : loop_(MessageLoop::TYPE_IO), diff --git a/chrome/browser/extensions/image_loading_tracker_unittest.cc b/chrome/browser/extensions/image_loading_tracker_unittest.cc index 7dadf12..2cb5631 100644 --- a/chrome/browser/extensions/image_loading_tracker_unittest.cc +++ b/chrome/browser/extensions/image_loading_tracker_unittest.cc @@ -10,7 +10,6 @@ #include "chrome/common/extensions/extension.h" #include "chrome/common/extensions/extension_icon_set.h" #include "chrome/common/extensions/extension_resource.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "content/browser/browser_thread.h" #include "content/common/json_value_serializer.h" #include "content/common/notification_service.h" @@ -18,7 +17,7 @@ #include "third_party/skia/include/core/SkBitmap.h" #include "ui/gfx/size.h" -class ImageLoadingTrackerTest : public TestingBrowserProcessTest, +class ImageLoadingTrackerTest : public testing::Test, public ImageLoadingTracker::Observer { public: ImageLoadingTrackerTest() diff --git a/chrome/browser/extensions/user_script_master_unittest.cc b/chrome/browser/extensions/user_script_master_unittest.cc index 2637c28..9d2abcc 100644 --- a/chrome/browser/extensions/user_script_master_unittest.cc +++ b/chrome/browser/extensions/user_script_master_unittest.cc @@ -13,7 +13,6 @@ #include "base/scoped_temp_dir.h" #include "base/string_util.h" #include "chrome/common/chrome_notification_types.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/test/base/testing_profile.h" #include "content/browser/browser_thread.h" #include "content/common/notification_registrar.h" @@ -32,7 +31,7 @@ static void AddPattern(URLPatternSet* extent, const std::string& pattern) { // Test bringing up a master on a specific directory, putting a script // in there, etc. -class UserScriptMasterTest : public TestingBrowserProcessTest, +class UserScriptMasterTest : public testing::Test, public NotificationObserver { public: UserScriptMasterTest() diff --git a/chrome/browser/geolocation/geolocation_content_settings_map_unittest.cc b/chrome/browser/geolocation/geolocation_content_settings_map_unittest.cc index 243d20b..6a50672 100644 --- a/chrome/browser/geolocation/geolocation_content_settings_map_unittest.cc +++ b/chrome/browser/geolocation/geolocation_content_settings_map_unittest.cc @@ -10,7 +10,6 @@ #include "chrome/browser/prefs/scoped_user_pref_update.h" #include "chrome/common/chrome_notification_types.h" #include "chrome/common/pref_names.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/test/base/testing_profile.h" #include "content/browser/browser_thread.h" #include "content/common/notification_registrar.h" @@ -60,7 +59,7 @@ void MockGeolocationSettingsObserver::Observe( GURL("http://foo.random-hostname.com/")); } -class GeolocationContentSettingsMapTests : public TestingBrowserProcessTest { +class GeolocationContentSettingsMapTests : public testing::Test { public: GeolocationContentSettingsMapTests() : ui_thread_(BrowserThread::UI, &message_loop_) { diff --git a/chrome/browser/geolocation/geolocation_settings_state_unittest.cc b/chrome/browser/geolocation/geolocation_settings_state_unittest.cc index d5ed2fd..38feb7b 100644 --- a/chrome/browser/geolocation/geolocation_settings_state_unittest.cc +++ b/chrome/browser/geolocation/geolocation_settings_state_unittest.cc @@ -6,7 +6,6 @@ #include "chrome/browser/content_settings/host_content_settings_map.h" #include "chrome/browser/geolocation/geolocation_settings_state.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/test/base/testing_profile.h" #include "content/browser/browser_thread.h" #include "content/browser/tab_contents/navigation_details.h" @@ -15,7 +14,7 @@ namespace { -class GeolocationSettingsStateTests : public TestingBrowserProcessTest { +class GeolocationSettingsStateTests : public testing::Test { public: GeolocationSettingsStateTests() : ui_thread_(BrowserThread::UI, &message_loop_) { diff --git a/chrome/browser/google/google_url_tracker_unittest.cc b/chrome/browser/google/google_url_tracker_unittest.cc index 9a1c8b5..5ef262a 100644 --- a/chrome/browser/google/google_url_tracker_unittest.cc +++ b/chrome/browser/google/google_url_tracker_unittest.cc @@ -11,7 +11,7 @@ #include "chrome/browser/tab_contents/confirm_infobar_delegate.h" #include "chrome/common/chrome_notification_types.h" #include "chrome/common/pref_names.h" -#include "chrome/test/base/testing_browser_process_test.h" +#include "chrome/test/base/testing_browser_process.h" #include "chrome/test/base/testing_pref_service.h" #include "content/browser/browser_thread.h" #include "content/common/notification_service.h" @@ -100,7 +100,7 @@ InfoBarDelegate* CreateTestInfobar( // GoogleURLTrackerTest ------------------------------------------------------- -class GoogleURLTrackerTest : public TestingBrowserProcessTest { +class GoogleURLTrackerTest : public testing::Test { protected: GoogleURLTrackerTest(); virtual ~GoogleURLTrackerTest(); @@ -144,7 +144,7 @@ GoogleURLTrackerTest::GoogleURLTrackerTest() : observer_(new TestNotificationObserver), message_loop_(MessageLoop::TYPE_IO), io_thread_(BrowserThread::IO, &message_loop_), - local_state_(testing_browser_process_.get()) { + local_state_(static_cast<TestingBrowserProcess*>(g_browser_process)) { } GoogleURLTrackerTest::~GoogleURLTrackerTest() { @@ -155,14 +155,16 @@ void GoogleURLTrackerTest::SetUp() { GoogleURLTracker* tracker = new GoogleURLTracker; tracker->queue_wakeup_task_ = false; MessageLoop::current()->RunAllPending(); - testing_browser_process_.get()->SetGoogleURLTracker(tracker); + static_cast<TestingBrowserProcess*>(g_browser_process)->SetGoogleURLTracker( + tracker); g_browser_process->google_url_tracker()->infobar_creator_ = &CreateTestInfobar; } void GoogleURLTrackerTest::TearDown() { - testing_browser_process_.get()->SetGoogleURLTracker(NULL); + static_cast<TestingBrowserProcess*>(g_browser_process)->SetGoogleURLTracker( + NULL); network_change_notifier_.reset(); } diff --git a/chrome/browser/history/expire_history_backend_unittest.cc b/chrome/browser/history/expire_history_backend_unittest.cc index 5b2d1b8..6364fb3 100644 --- a/chrome/browser/history/expire_history_backend_unittest.cc +++ b/chrome/browser/history/expire_history_backend_unittest.cc @@ -24,7 +24,6 @@ #include "chrome/browser/history/top_sites.h" #include "chrome/common/chrome_notification_types.h" #include "chrome/common/thumbnail_score.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/test/base/testing_profile.h" #include "chrome/tools/profiles/thumbnail-inl.h" #include "content/browser/browser_thread.h" @@ -49,7 +48,7 @@ namespace history { // ExpireHistoryTest ----------------------------------------------------------- -class ExpireHistoryTest : public TestingBrowserProcessTest, +class ExpireHistoryTest : public testing::Test, public BroadcastNotificationDelegate { public: ExpireHistoryTest() diff --git a/chrome/browser/history/history_backend_unittest.cc b/chrome/browser/history/history_backend_unittest.cc index c6f2c75..253698c 100644 --- a/chrome/browser/history/history_backend_unittest.cc +++ b/chrome/browser/history/history_backend_unittest.cc @@ -21,7 +21,6 @@ #include "chrome/common/chrome_constants.h" #include "chrome/common/chrome_paths.h" #include "chrome/common/thumbnail_score.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/tools/profiles/thumbnail-inl.h" #include "content/common/notification_details.h" #include "content/common/notification_source.h" @@ -69,7 +68,7 @@ class HistoryBackendTestDelegate : public HistoryBackend::Delegate { DISALLOW_COPY_AND_ASSIGN(HistoryBackendTestDelegate); }; -class HistoryBackendTest : public TestingBrowserProcessTest { +class HistoryBackendTest : public testing::Test { public: HistoryBackendTest() : bookmark_model_(NULL), loaded_(false) {} virtual ~HistoryBackendTest() { diff --git a/chrome/browser/history/history_querying_unittest.cc b/chrome/browser/history/history_querying_unittest.cc index f982013..609f78a 100644 --- a/chrome/browser/history/history_querying_unittest.cc +++ b/chrome/browser/history/history_querying_unittest.cc @@ -10,7 +10,6 @@ #include "base/scoped_temp_dir.h" #include "base/utf_string_conversions.h" #include "chrome/browser/history/history.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "testing/gtest/include/gtest/gtest.h" using base::Time; @@ -68,7 +67,7 @@ bool NthResultIs(const QueryResults& results, } // namespace -class HistoryQueryTest : public TestingBrowserProcessTest { +class HistoryQueryTest : public testing::Test { public: HistoryQueryTest() { } diff --git a/chrome/browser/history/history_unittest.cc b/chrome/browser/history/history_unittest.cc index 0d5b0d0..8af6c3d 100644 --- a/chrome/browser/history/history_unittest.cc +++ b/chrome/browser/history/history_unittest.cc @@ -43,7 +43,6 @@ #include "chrome/browser/history/page_usage_data.h" #include "chrome/common/chrome_paths.h" #include "chrome/common/thumbnail_score.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/tools/profiles/thumbnail-inl.h" #include "content/browser/download/download_item.h" #include "content/browser/download/download_persistent_store_info.h" @@ -101,7 +100,7 @@ class BackendDelegate : public HistoryBackend::Delegate { // This must be outside the anonymous namespace for the friend statement in // HistoryBackend to work. -class HistoryTest : public TestingBrowserProcessTest { +class HistoryTest : public testing::Test { public: HistoryTest() : history_service_(NULL), diff --git a/chrome/browser/history/history_unittest_base.h b/chrome/browser/history/history_unittest_base.h index 4e5fbb1..1d9512d 100644 --- a/chrome/browser/history/history_unittest_base.h +++ b/chrome/browser/history/history_unittest_base.h @@ -6,13 +6,12 @@ #define CHROME_BROWSER_HISTORY_HISTORY_UNITTEST_BASE_H_ #include "base/file_util.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "testing/gtest/include/gtest/gtest.h" namespace history { // A base class for a history unit test. It provides the common test methods. // -class HistoryUnitTestBase : public TestingBrowserProcessTest { +class HistoryUnitTestBase : public testing::Test { public: virtual ~HistoryUnitTestBase(); diff --git a/chrome/browser/importer/importer_unittest.cc b/chrome/browser/importer/importer_unittest.cc index 1b22acd..3772ce7 100644 --- a/chrome/browser/importer/importer_unittest.cc +++ b/chrome/browser/importer/importer_unittest.cc @@ -32,7 +32,6 @@ #include "chrome/browser/importer/importer_progress_observer.h" #include "chrome/browser/search_engines/template_url.h" #include "chrome/common/chrome_paths.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/test/base/testing_profile.h" #include "content/browser/browser_thread.h" #include "testing/gtest/include/gtest/gtest.h" @@ -52,7 +51,7 @@ #define MAYBE(x) x #endif -class ImporterTest : public TestingBrowserProcessTest { +class ImporterTest : public testing::Test { public: ImporterTest() : ui_thread_(BrowserThread::UI, &message_loop_), diff --git a/chrome/browser/instant/promo_counter_unittest.cc b/chrome/browser/instant/promo_counter_unittest.cc index 9ccdb58..a9b85be 100644 --- a/chrome/browser/instant/promo_counter_unittest.cc +++ b/chrome/browser/instant/promo_counter_unittest.cc @@ -3,11 +3,10 @@ // found in the LICENSE file. #include "chrome/browser/instant/promo_counter.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/test/base/testing_profile.h" #include "testing/gtest/include/gtest/gtest.h" -typedef TestingBrowserProcessTest PromoCounterTest; +typedef testing::Test PromoCounterTest; // Makes sure ShouldShow returns false after the max number of days. TEST_F(PromoCounterTest, MaxTimeElapsed) { diff --git a/chrome/browser/intents/register_intent_handler_infobar_delegate_unittest.cc b/chrome/browser/intents/register_intent_handler_infobar_delegate_unittest.cc index f8d201c..0c47e65 100644 --- a/chrome/browser/intents/register_intent_handler_infobar_delegate_unittest.cc +++ b/chrome/browser/intents/register_intent_handler_infobar_delegate_unittest.cc @@ -8,7 +8,6 @@ #include "chrome/browser/intents/web_intents_registry.h" #include "chrome/browser/intents/web_intents_registry_factory.h" #include "chrome/browser/intents/web_intent_data.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/test/base/testing_profile.h" #include "content/browser/browser_thread.h" #include "content/browser/renderer_host/test_render_view_host.h" diff --git a/chrome/browser/intents/web_intents_registry_unittest.cc b/chrome/browser/intents/web_intents_registry_unittest.cc index 72460f7..4461029 100644 --- a/chrome/browser/intents/web_intents_registry_unittest.cc +++ b/chrome/browser/intents/web_intents_registry_unittest.cc @@ -7,10 +7,9 @@ #include "base/utf_string_conversions.h" #include "chrome/browser/intents/web_intents_registry.h" #include "chrome/browser/webdata/web_data_service.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "testing/gtest/include/gtest/gtest.h" -class WebIntentsRegistryTest : public TestingBrowserProcessTest { +class WebIntentsRegistryTest : public testing::Test { public: WebIntentsRegistryTest() : ui_thread_(BrowserThread::UI, &message_loop_), diff --git a/chrome/browser/metrics/metrics_service_uitest.cc b/chrome/browser/metrics/metrics_service_uitest.cc index db584d5..f323fdc 100644 --- a/chrome/browser/metrics/metrics_service_uitest.cc +++ b/chrome/browser/metrics/metrics_service_uitest.cc @@ -62,9 +62,6 @@ class MetricsServiceTest : public UITest { FilePath path = user_data_dir().Append(chrome::kLocalStateFilename); return PrefServiceMockBuilder().WithUserFilePrefs(path).Create(); } - - private: - NotificationService notification_service_; }; TEST_F(MetricsServiceTest, CloseRenderersNormally) { diff --git a/chrome/browser/net/gaia/gaia_oauth_fetcher_unittest.cc b/chrome/browser/net/gaia/gaia_oauth_fetcher_unittest.cc index 22fac88..d92f41b 100644 --- a/chrome/browser/net/gaia/gaia_oauth_fetcher_unittest.cc +++ b/chrome/browser/net/gaia/gaia_oauth_fetcher_unittest.cc @@ -16,7 +16,6 @@ #include "chrome/common/net/gaia/gaia_constants.h" #include "chrome/common/net/gaia/google_service_auth_error.h" #include "chrome/common/net/http_return.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/test/base/testing_profile.h" #include "content/common/notification_service.h" #include "content/common/url_fetcher.h" @@ -148,7 +147,7 @@ TEST(GaiaOAuthFetcherTest, GetOAuthToken) { } #endif // 0 // Suppressing for now -typedef TestingBrowserProcessTest GaiaOAuthFetcherTest; +typedef testing::Test GaiaOAuthFetcherTest; TEST_F(GaiaOAuthFetcherTest, OAuthGetAccessToken) { const std::string oauth_token = diff --git a/chrome/browser/net/gaia/token_service_unittest.h b/chrome/browser/net/gaia/token_service_unittest.h index 24761b7..ed2fe00 100644 --- a/chrome/browser/net/gaia/token_service_unittest.h +++ b/chrome/browser/net/gaia/token_service_unittest.h @@ -14,7 +14,6 @@ #include "chrome/common/net/gaia/gaia_auth_consumer.h" #include "chrome/test/base/signaling_task.h" #include "chrome/test/base/test_notification_tracker.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/test/base/testing_profile.h" #include "content/common/notification_details.h" #include "content/common/notification_source.h" @@ -57,7 +56,7 @@ class TokenFailedTracker : public TestNotificationTracker { TokenService::TokenRequestFailedDetails details_; }; -class TokenServiceTestHarness : public TestingBrowserProcessTest { +class TokenServiceTestHarness : public testing::Test { public: TokenServiceTestHarness(); virtual ~TokenServiceTestHarness(); diff --git a/chrome/browser/notifications/desktop_notifications_unittest.h b/chrome/browser/notifications/desktop_notifications_unittest.h index 8fbef27..f2f2eb2a 100644 --- a/chrome/browser/notifications/desktop_notifications_unittest.h +++ b/chrome/browser/notifications/desktop_notifications_unittest.h @@ -16,7 +16,6 @@ #include "chrome/browser/notifications/notification_test_util.h" #include "chrome/browser/notifications/notification_ui_manager.h" #include "chrome/browser/notifications/notifications_prefs_cache.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/test/base/testing_pref_service.h" #include "chrome/test/base/testing_profile.h" #include "content/browser/browser_thread.h" @@ -68,7 +67,7 @@ class MockBalloonCollection : public BalloonCollectionImpl { std::deque<Balloon*> balloons_; }; -class DesktopNotificationsTest : public TestingBrowserProcessTest { +class DesktopNotificationsTest : public testing::Test { public: DesktopNotificationsTest(); virtual ~DesktopNotificationsTest(); diff --git a/chrome/browser/password_manager/native_backend_gnome_x_unittest.cc b/chrome/browser/password_manager/native_backend_gnome_x_unittest.cc index 1f253ff..1c4dd99 100644 --- a/chrome/browser/password_manager/native_backend_gnome_x_unittest.cc +++ b/chrome/browser/password_manager/native_backend_gnome_x_unittest.cc @@ -13,7 +13,6 @@ #include "chrome/browser/password_manager/native_backend_gnome_x.h" #include "chrome/browser/prefs/pref_service.h" #include "chrome/common/pref_names.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/test/base/testing_profile.h" #include "testing/gtest/include/gtest/gtest.h" @@ -282,7 +281,7 @@ struct RunnableMethodTraits<NativeBackendGnome> { void ReleaseCallee(NativeBackendGnome*) {} }; -class NativeBackendGnomeTest : public TestingBrowserProcessTest { +class NativeBackendGnomeTest : public testing::Test { protected: NativeBackendGnomeTest() : ui_thread_(BrowserThread::UI, &message_loop_), diff --git a/chrome/browser/password_manager/password_form_manager_unittest.cc b/chrome/browser/password_manager/password_form_manager_unittest.cc index 6e68955..d8affba 100644 --- a/chrome/browser/password_manager/password_form_manager_unittest.cc +++ b/chrome/browser/password_manager/password_form_manager_unittest.cc @@ -9,13 +9,12 @@ #include "chrome/browser/password_manager/password_form_manager.h" #include "chrome/browser/password_manager/password_manager.h" #include "chrome/browser/profiles/profile_manager.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/test/base/testing_profile.h" #include "webkit/glue/password_form.h" using webkit_glue::PasswordForm; -class PasswordFormManagerTest : public TestingBrowserProcessTest { +class PasswordFormManagerTest : public testing::Test { public: PasswordFormManagerTest() { } diff --git a/chrome/browser/password_manager/password_store_default_unittest.cc b/chrome/browser/password_manager/password_store_default_unittest.cc index 0332351..db6b8b0 100644 --- a/chrome/browser/password_manager/password_store_default_unittest.cc +++ b/chrome/browser/password_manager/password_store_default_unittest.cc @@ -18,7 +18,6 @@ #include "chrome/common/chrome_notification_types.h" #include "chrome/common/pref_names.h" #include "chrome/test/base/signaling_task.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/test/base/testing_profile.h" #include "content/common/notification_details.h" #include "content/common/notification_observer_mock.h" @@ -99,7 +98,7 @@ class DBThreadObserverHelper : typedef std::vector<PasswordForm*> VectorOfForms; -class PasswordStoreDefaultTest : public TestingBrowserProcessTest { +class PasswordStoreDefaultTest : public testing::Test { protected: PasswordStoreDefaultTest() : ui_thread_(BrowserThread::UI, &message_loop_), diff --git a/chrome/browser/password_manager/password_store_win_unittest.cc b/chrome/browser/password_manager/password_store_win_unittest.cc index ccfb138..6b187c2 100644 --- a/chrome/browser/password_manager/password_store_win_unittest.cc +++ b/chrome/browser/password_manager/password_store_win_unittest.cc @@ -21,7 +21,6 @@ #include "chrome/browser/webdata/web_data_service.h" #include "chrome/common/pref_names.h" #include "chrome/test/base/signaling_task.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/test/base/testing_profile.h" #include "content/browser/browser_thread.h" #include "testing/gmock/include/gmock/gmock.h" @@ -52,7 +51,7 @@ public: typedef std::vector<PasswordForm*> VectorOfForms; -class PasswordStoreWinTest : public TestingBrowserProcessTest { +class PasswordStoreWinTest : public testing::Test { protected: PasswordStoreWinTest() : ui_thread_(BrowserThread::UI, &message_loop_), diff --git a/chrome/browser/password_manager/password_store_x_unittest.cc b/chrome/browser/password_manager/password_store_x_unittest.cc index bb09d4e..8fe5622 100644 --- a/chrome/browser/password_manager/password_store_x_unittest.cc +++ b/chrome/browser/password_manager/password_store_x_unittest.cc @@ -320,8 +320,6 @@ class PasswordStoreXTest : public testing::TestWithParam<BackendType> { } } - ScopedTestingBrowserProcess browser_process_; - MessageLoopForUI message_loop_; BrowserThread ui_thread_; BrowserThread db_thread_; // PasswordStore, WDS schedule work on this thread. diff --git a/chrome/browser/plugin_exceptions_table_model_unittest.cc b/chrome/browser/plugin_exceptions_table_model_unittest.cc index 3163b04..3c59fd7 100644 --- a/chrome/browser/plugin_exceptions_table_model_unittest.cc +++ b/chrome/browser/plugin_exceptions_table_model_unittest.cc @@ -7,7 +7,6 @@ #include "base/utf_string_conversions.h" #include "chrome/browser/mock_plugin_exceptions_table_model.h" #include "chrome/common/chrome_switches.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/test/base/testing_pref_service.h" #include "chrome/test/base/testing_profile.h" #include "testing/gmock/include/gmock/gmock.h" @@ -53,7 +52,7 @@ class MockTableModelObserver : public ui::TableModelObserver { using ::testing::InSequence; -class PluginExceptionsTableModelTest : public TestingBrowserProcessTest { +class PluginExceptionsTableModelTest : public testing::Test { public: PluginExceptionsTableModelTest() : ui_thread_(BrowserThread::UI, &message_loop_), diff --git a/chrome/browser/policy/cloud_policy_subsystem_unittest.cc b/chrome/browser/policy/cloud_policy_subsystem_unittest.cc index d190e7e..cd11107 100644 --- a/chrome/browser/policy/cloud_policy_subsystem_unittest.cc +++ b/chrome/browser/policy/cloud_policy_subsystem_unittest.cc @@ -228,8 +228,6 @@ class CloudPolicySubsystemTestBase : public TESTBASE { << "No enough requests were fired during the test run."; } - ScopedTestingBrowserProcess browser_process_; - ScopedTempDir temp_user_data_dir_; MessageLoop loop_; diff --git a/chrome/browser/policy/device_management_service_unittest.cc b/chrome/browser/policy/device_management_service_unittest.cc index 64813f5..49fbe05 100644 --- a/chrome/browser/policy/device_management_service_unittest.cc +++ b/chrome/browser/policy/device_management_service_unittest.cc @@ -74,8 +74,6 @@ class DeviceManagementServiceTestBase : public TESTBASE { scoped_ptr<DeviceManagementBackend> backend_; private: - ScopedTestingBrowserProcess browser_process_; - MessageLoopForUI loop_; BrowserThread ui_thread_; BrowserThread io_thread_; diff --git a/chrome/browser/policy/device_policy_cache_unittest.cc b/chrome/browser/policy/device_policy_cache_unittest.cc index cd9d062..7b706d1 100644 --- a/chrome/browser/policy/device_policy_cache_unittest.cc +++ b/chrome/browser/policy/device_policy_cache_unittest.cc @@ -8,7 +8,6 @@ #include "chrome/browser/chromeos/login/mock_signed_settings_helper.h" #include "chrome/browser/policy/cloud_policy_data_store.h" #include "chrome/browser/policy/enterprise_install_attributes.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "policy/configuration_policy_type.h" #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" @@ -70,7 +69,7 @@ void CreateProxyPolicy(em::PolicyFetchResponse* policy, } // namespace -class DevicePolicyCacheTest : public TestingBrowserProcessTest { +class DevicePolicyCacheTest : public testing::Test { protected: DevicePolicyCacheTest() : cryptohome_(chromeos::CryptohomeLibrary::GetImpl(true)), diff --git a/chrome/browser/policy/enterprise_metrics_browsertest.cc b/chrome/browser/policy/enterprise_metrics_browsertest.cc index 26a33db..3ecfc684 100644 --- a/chrome/browser/policy/enterprise_metrics_browsertest.cc +++ b/chrome/browser/policy/enterprise_metrics_browsertest.cc @@ -22,7 +22,6 @@ #include "chrome/browser/policy/proto/device_management_local.pb.h" #include "chrome/browser/policy/user_policy_cache.h" #include "chrome/browser/policy/user_policy_token_cache.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "content/browser/browser_thread.h" #include "net/url_request/url_request_status.h" #include "testing/gmock/include/gmock/gmock.h" @@ -114,7 +113,7 @@ class DeviceManagementBackendTestHelper { // in its own process to make sure the counters are not initialized before the // test runs, and that the StatisticsRecorder instance created for the test // doesn't interfere with counters in other tests. -class EnterpriseMetricsTest : public TestingBrowserProcessTest { +class EnterpriseMetricsTest : public testing::Test { public: EnterpriseMetricsTest() : ui_thread_(BrowserThread::UI, &loop_), diff --git a/chrome/browser/policy/user_policy_cache_unittest.cc b/chrome/browser/policy/user_policy_cache_unittest.cc index 82929a8..80d04af 100644 --- a/chrome/browser/policy/user_policy_cache_unittest.cc +++ b/chrome/browser/policy/user_policy_cache_unittest.cc @@ -16,7 +16,6 @@ #include "chrome/browser/policy/proto/device_management_backend.pb.h" #include "chrome/browser/policy/proto/device_management_local.pb.h" #include "chrome/browser/policy/proto/old_generic_format.pb.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "content/browser/browser_thread.h" #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" @@ -45,7 +44,7 @@ class MockCloudPolicyCacheBaseObserver }; // Tests the device management policy cache. -class UserPolicyCacheTest : public TestingBrowserProcessTest { +class UserPolicyCacheTest : public testing::Test { protected: UserPolicyCacheTest() : loop_(MessageLoop::TYPE_UI), diff --git a/chrome/browser/prefs/pref_model_associator_unittest.cc b/chrome/browser/prefs/pref_model_associator_unittest.cc index 00864be..bc7516c 100644 --- a/chrome/browser/prefs/pref_model_associator_unittest.cc +++ b/chrome/browser/prefs/pref_model_associator_unittest.cc @@ -7,11 +7,10 @@ #include "chrome/browser/prefs/pref_model_associator.h" #include "chrome/browser/prefs/scoped_user_pref_update.h" #include "chrome/common/pref_names.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/test/base/testing_profile.h" #include "testing/gtest/include/gtest/gtest.h" -class AbstractPreferenceMergeTest : public TestingBrowserProcessTest { +class AbstractPreferenceMergeTest : public testing::Test { protected: virtual void SetUp() { pref_service_ = profile_.GetPrefs(); diff --git a/chrome/browser/prefs/pref_notifier_impl_unittest.cc b/chrome/browser/prefs/pref_notifier_impl_unittest.cc index 2e6d4a7..b2387ab 100644 --- a/chrome/browser/prefs/pref_notifier_impl_unittest.cc +++ b/chrome/browser/prefs/pref_notifier_impl_unittest.cc @@ -7,7 +7,6 @@ #include "chrome/browser/prefs/pref_service.h" #include "chrome/browser/prefs/pref_value_store.h" #include "chrome/common/chrome_notification_types.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/test/base/testing_pref_service.h" #include "content/common/notification_observer_mock.h" #include "content/common/notification_registrar.h" @@ -55,7 +54,7 @@ class MockPrefNotifier : public PrefNotifierImpl { }; // Test fixture class. -class PrefNotifierTest : public TestingBrowserProcessTest { +class PrefNotifierTest : public testing::Test { protected: virtual void SetUp() { pref_service_.RegisterBooleanPref(kChangedPref, diff --git a/chrome/browser/prerender/prerender_manager_unittest.cc b/chrome/browser/prerender/prerender_manager_unittest.cc index 2aab7b9a..3184de4 100644 --- a/chrome/browser/prerender/prerender_manager_unittest.cc +++ b/chrome/browser/prerender/prerender_manager_unittest.cc @@ -199,11 +199,10 @@ class PrerenderManagerTest : public testing::Test { private: PrerenderTracker* prerender_tracker() { - return browser_process_.get()->prerender_tracker(); + return g_browser_process->prerender_tracker(); } // Needed to pass PrerenderManager's DCHECKs. - ScopedTestingBrowserProcess browser_process_; MessageLoop message_loop_; BrowserThread ui_thread_; scoped_ptr<TestPrerenderManager> prerender_manager_; diff --git a/chrome/browser/prerender/prerender_tracker_unittest.cc b/chrome/browser/prerender/prerender_tracker_unittest.cc index 0c4be97..f07fd2b 100644 --- a/chrome/browser/prerender/prerender_tracker_unittest.cc +++ b/chrome/browser/prerender/prerender_tracker_unittest.cc @@ -51,7 +51,7 @@ class PrerenderTrackerTest : public testing::Test { } PrerenderTracker* prerender_tracker() { - return browser_process_.get()->prerender_tracker(); + return g_browser_process->prerender_tracker(); } int GetCurrentStatus(int child_id, int route_id) { @@ -69,7 +69,6 @@ class PrerenderTrackerTest : public testing::Test { } private: - ScopedTestingBrowserProcess browser_process_; MessageLoop message_loop_; BrowserThread ui_thread_; BrowserThread io_thread_; diff --git a/chrome/browser/printing/print_dialog_cloud_unittest.cc b/chrome/browser/printing/print_dialog_cloud_unittest.cc index 25b9da9..6fc2eaf 100644 --- a/chrome/browser/printing/print_dialog_cloud_unittest.cc +++ b/chrome/browser/printing/print_dialog_cloud_unittest.cc @@ -18,7 +18,6 @@ #include "chrome/browser/printing/cloud_print/cloud_print_url.h" #include "chrome/common/chrome_paths.h" #include "chrome/common/url_constants.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/test/base/testing_profile.h" #include "content/browser/browser_thread.h" #include "content/common/content_notification_types.h" @@ -147,7 +146,7 @@ class MockCloudPrintDataSenderHelper : public CloudPrintDataSenderHelper { const Value& arg2)); }; -class CloudPrintURLTest : public TestingBrowserProcessTest { +class CloudPrintURLTest : public testing::Test { public: CloudPrintURLTest() {} diff --git a/chrome/browser/printing/print_job_unittest.cc b/chrome/browser/printing/print_job_unittest.cc index 287008e3..0994fca 100644 --- a/chrome/browser/printing/print_job_unittest.cc +++ b/chrome/browser/printing/print_job_unittest.cc @@ -7,7 +7,6 @@ #include "chrome/browser/printing/print_job.h" #include "chrome/browser/printing/print_job_worker.h" #include "chrome/common/chrome_notification_types.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "content/common/notification_registrar.h" #include "content/common/notification_service.h" #include "googleurl/src/gurl.h" @@ -87,7 +86,7 @@ class TestPrintNotifObserv : public NotificationObserver { } // namespace -typedef TestingBrowserProcessTest PrintJobTest; +typedef testing::Test PrintJobTest; TEST_F(PrintJobTest, SimplePrint) { // Test the multi-threaded nature of PrintJob to make sure we can use it with diff --git a/chrome/browser/printing/print_preview_tab_controller_unittest.cc b/chrome/browser/printing/print_preview_tab_controller_unittest.cc index c592857..1d10e9f 100644 --- a/chrome/browser/printing/print_preview_tab_controller_unittest.cc +++ b/chrome/browser/printing/print_preview_tab_controller_unittest.cc @@ -11,6 +11,7 @@ #include "content/browser/tab_contents/navigation_entry.h" #include "content/browser/tab_contents/navigation_details.h" #include "content/browser/tab_contents/tab_contents.h" +#include "content/common/notification_service.h" #include "content/common/url_constants.h" typedef BrowserWithTestWindowTest PrintPreviewTabControllerUnitTest; diff --git a/chrome/browser/profiles/avatar_menu_model_unittest.cc b/chrome/browser/profiles/avatar_menu_model_unittest.cc index 44ca3f6..fa862d7 100644 --- a/chrome/browser/profiles/avatar_menu_model_unittest.cc +++ b/chrome/browser/profiles/avatar_menu_model_unittest.cc @@ -10,7 +10,6 @@ #include "chrome/browser/profiles/fake_profile_info_interface.h" #include "chrome/browser/profiles/profile_info_interface.h" #include "chrome/common/chrome_notification_types.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "content/common/notification_service.h" #include "testing/gtest/include/gtest/gtest.h" @@ -32,7 +31,7 @@ class MockObserver : public AvatarMenuModelObserver { int count_; }; -class AvatarMenuModelTest : public TestingBrowserProcessTest { +class AvatarMenuModelTest : public testing::Test { public: FakeProfileInfo* cache() { return &cache_; diff --git a/chrome/browser/profiles/profile_info_cache_unittest.cc b/chrome/browser/profiles/profile_info_cache_unittest.cc index f56281d..133970b 100644 --- a/chrome/browser/profiles/profile_info_cache_unittest.cc +++ b/chrome/browser/profiles/profile_info_cache_unittest.cc @@ -6,17 +6,20 @@ #include "base/stringprintf.h" #include "base/utf_string_conversions.h" -#include "chrome/test/base/testing_browser_process_test.h" +#include "chrome/browser/browser_process.h" +#include "chrome/test/base/testing_browser_process.h" #include "chrome/test/base/testing_pref_service.h" +#include "testing/gtest/include/gtest/gtest.h" #include "third_party/skia/include/core/SkBitmap.h" #include "ui/base/resource/resource_bundle.h" #include "ui/gfx/image/image.h" namespace { -class ProfileInfoCacheUnittests : public TestingBrowserProcessTest { +class ProfileInfoCacheUnittests : public testing::Test { protected: - ProfileInfoCacheUnittests() : local_state_(testing_browser_process_.get()) { + ProfileInfoCacheUnittests() + : local_state_(static_cast<TestingBrowserProcess*>(g_browser_process)) { cache_.reset(new ProfileInfoCache(local_state_.Get(), GetUserDataDir())); } diff --git a/chrome/browser/profiles/profile_manager_unittest.cc b/chrome/browser/profiles/profile_manager_unittest.cc index ab0073a..b2e1fec 100644 --- a/chrome/browser/profiles/profile_manager_unittest.cc +++ b/chrome/browser/profiles/profile_manager_unittest.cc @@ -10,6 +10,7 @@ #include "base/scoped_temp_dir.h" #include "base/system_monitor/system_monitor.h" #include "base/values.h" +#include "chrome/browser/browser_process.h" #include "chrome/browser/extensions/extension_event_router_forwarder.h" #include "chrome/browser/io_thread.h" #include "chrome/browser/prefs/browser_prefs.h" @@ -20,7 +21,7 @@ #include "chrome/common/chrome_paths.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/pref_names.h" -#include "chrome/test/base/testing_browser_process_test.h" +#include "chrome/test/base/testing_browser_process.h" #include "chrome/test/base/testing_pref_service.h" #include "content/browser/browser_thread.h" #include "content/common/notification_service.h" @@ -34,10 +35,10 @@ Profile* g_created_profile; } // namespace -class ProfileManagerTest : public TestingBrowserProcessTest { +class ProfileManagerTest : public testing::Test { protected: ProfileManagerTest() - : local_state_(testing_browser_process_.get()), + : local_state_(static_cast<TestingBrowserProcess*>(g_browser_process)), extension_event_router_forwarder_(new ExtensionEventRouterForwarder), ui_thread_(BrowserThread::UI, &message_loop_), db_thread_(BrowserThread::DB, &message_loop_), @@ -48,7 +49,8 @@ class ProfileManagerTest : public TestingBrowserProcessTest { base::SystemMonitor::AllocateSystemIOPorts(); #endif system_monitor_dummy_.reset(new base::SystemMonitor); - testing_browser_process_.get()->SetIOThread(&io_thread_); + static_cast<TestingBrowserProcess*>(g_browser_process)->SetIOThread( + &io_thread_); } virtual void SetUp() { diff --git a/chrome/browser/renderer_host/text_input_client_mac_unittest.mm b/chrome/browser/renderer_host/text_input_client_mac_unittest.mm index a3e8a33..2ea2735 100644 --- a/chrome/browser/renderer_host/text_input_client_mac_unittest.mm +++ b/chrome/browser/renderer_host/text_input_client_mac_unittest.mm @@ -9,7 +9,6 @@ #include "base/threading/thread.h" #include "chrome/browser/renderer_host/text_input_client_message_filter.h" #include "chrome/common/text_input_client_messages.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/test/base/testing_profile.h" #include "content/browser/renderer_host/mock_render_process_host.h" #include "content/browser/renderer_host/render_process_host.h" @@ -25,7 +24,7 @@ const int64 kTaskDelayMs = 200; // This test does not test the WebKit side of the dictionary system (which // performs the actual data fetching), but rather this just tests that the // service's signaling system works. -class TextInputClientMacTest : public TestingBrowserProcessTest { +class TextInputClientMacTest : public testing::Test { public: TextInputClientMacTest() : message_loop_(MessageLoop::TYPE_UI), diff --git a/chrome/browser/renderer_host/web_cache_manager_unittest.cc b/chrome/browser/renderer_host/web_cache_manager_unittest.cc index dbb56c7..11b5b13 100644 --- a/chrome/browser/renderer_host/web_cache_manager_unittest.cc +++ b/chrome/browser/renderer_host/web_cache_manager_unittest.cc @@ -6,7 +6,6 @@ #include "base/message_loop.h" #include "chrome/browser/renderer_host/web_cache_manager.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "content/browser/browser_thread.h" #include "testing/gtest/include/gtest/gtest.h" @@ -14,7 +13,7 @@ using base::Time; using base::TimeDelta; using WebKit::WebCache; -class WebCacheManagerTest : public TestingBrowserProcessTest { +class WebCacheManagerTest : public testing::Test { protected: typedef WebCacheManager::StatsMap StatsMap; typedef WebCacheManager::Allocation Allocation; diff --git a/chrome/browser/safe_browsing/client_side_detection_service_unittest.cc b/chrome/browser/safe_browsing/client_side_detection_service_unittest.cc index dcf2076..83ce5aa 100644 --- a/chrome/browser/safe_browsing/client_side_detection_service_unittest.cc +++ b/chrome/browser/safe_browsing/client_side_detection_service_unittest.cc @@ -18,7 +18,6 @@ #include "chrome/common/safe_browsing/client_model.pb.h" #include "chrome/common/safe_browsing/csd.pb.h" #include "chrome/renderer/safe_browsing/features.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "content/browser/browser_thread.h" #include "content/common/url_fetcher.h" #include "content/test/test_url_fetcher_factory.h" @@ -63,7 +62,7 @@ ACTION(QuitCurrentMessageLoop) { } // namespace -class ClientSideDetectionServiceTest : public TestingBrowserProcessTest { +class ClientSideDetectionServiceTest : public testing::Test { protected: virtual void SetUp() { file_thread_.reset(new BrowserThread(BrowserThread::FILE, &msg_loop_)); diff --git a/chrome/browser/search_engines/template_url_parser_unittest.cc b/chrome/browser/search_engines/template_url_parser_unittest.cc index 4fd826a..d0fae59 100644 --- a/chrome/browser/search_engines/template_url_parser_unittest.cc +++ b/chrome/browser/search_engines/template_url_parser_unittest.cc @@ -9,10 +9,9 @@ #include "chrome/browser/search_engines/template_url.h" #include "chrome/browser/search_engines/template_url_parser.h" #include "chrome/common/chrome_paths.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "testing/gtest/include/gtest/gtest.h" -class TemplateURLParserTest : public TestingBrowserProcessTest { +class TemplateURLParserTest : public testing::Test { public: TemplateURLParserTest() : parse_result_(true) { } diff --git a/chrome/browser/search_engines/template_url_prepopulate_data_unittest.cc b/chrome/browser/search_engines/template_url_prepopulate_data_unittest.cc index 354bc19..ca675f0 100644 --- a/chrome/browser/search_engines/template_url_prepopulate_data_unittest.cc +++ b/chrome/browser/search_engines/template_url_prepopulate_data_unittest.cc @@ -12,13 +12,12 @@ #include "chrome/browser/search_engines/template_url_service.h" #include "chrome/browser/search_engines/template_url_prepopulate_data.h" #include "chrome/common/pref_names.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/test/base/testing_pref_service.h" #include "chrome/test/base/testing_profile.h" #include "grit/theme_resources.h" #include "testing/gtest/include/gtest/gtest.h" -typedef TestingBrowserProcessTest TemplateURLPrepopulateDataTest; +typedef testing::Test TemplateURLPrepopulateDataTest; const int kCountryIds[] = { 'A'<<8|'D', 'A'<<8|'E', 'A'<<8|'F', 'A'<<8|'G', 'A'<<8|'I', diff --git a/chrome/browser/search_engines/template_url_service_sync_unittest.cc b/chrome/browser/search_engines/template_url_service_sync_unittest.cc index 91290e5..122b782 100644 --- a/chrome/browser/search_engines/template_url_service_sync_unittest.cc +++ b/chrome/browser/search_engines/template_url_service_sync_unittest.cc @@ -9,8 +9,8 @@ #include "chrome/browser/search_engines/template_url.h" #include "chrome/browser/search_engines/template_url_service.h" #include "chrome/browser/sync/protocol/search_engine_specifics.pb.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/test/base/testing_profile.h" +#include "testing/gtest/include/gtest/gtest.h" using base::Time; @@ -79,7 +79,7 @@ class TestChangeProcessor : public SyncChangeProcessor { DISALLOW_COPY_AND_ASSIGN(TestChangeProcessor); }; -class TemplateURLServiceSyncTest : public TestingBrowserProcessTest { +class TemplateURLServiceSyncTest : public testing::Test { public: typedef TemplateURLService::SyncDataMap SyncDataMap; diff --git a/chrome/browser/search_engines/template_url_service_test_util.h b/chrome/browser/search_engines/template_url_service_test_util.h index dd29b83..606cfd1 100644 --- a/chrome/browser/search_engines/template_url_service_test_util.h +++ b/chrome/browser/search_engines/template_url_service_test_util.h @@ -90,8 +90,6 @@ class TemplateURLServiceTestUtil : public TemplateURLServiceObserver { void StartIOThread(); private: - ScopedTestingBrowserProcess browser_process_; - MessageLoopForUI message_loop_; // Needed to make the DeleteOnUIThread trait of WebDataService work // properly. diff --git a/chrome/browser/search_engines/template_url_unittest.cc b/chrome/browser/search_engines/template_url_unittest.cc index 922ccb65..eabe078 100644 --- a/chrome/browser/search_engines/template_url_unittest.cc +++ b/chrome/browser/search_engines/template_url_unittest.cc @@ -9,7 +9,6 @@ #include "chrome/browser/rlz/rlz.h" #include "chrome/browser/search_engines/search_terms_data.h" #include "chrome/browser/search_engines/template_url.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "testing/gtest/include/gtest/gtest.h" // Simple implementation of SearchTermsData. @@ -40,7 +39,7 @@ class TestSearchTermsData : public SearchTermsData { DISALLOW_COPY_AND_ASSIGN(TestSearchTermsData); }; -class TemplateURLTest : public TestingBrowserProcessTest { +class TemplateURLTest : public testing::Test { public: virtual void TearDown() { TemplateURLRef::SetGoogleBaseURL(NULL); diff --git a/chrome/browser/sync/abstract_profile_sync_service_test.h b/chrome/browser/sync/abstract_profile_sync_service_test.h index 0342c73..7b5b34f 100644 --- a/chrome/browser/sync/abstract_profile_sync_service_test.h +++ b/chrome/browser/sync/abstract_profile_sync_service_test.h @@ -14,7 +14,6 @@ #include "chrome/browser/net/gaia/token_service.h" #include "chrome/browser/sync/profile_sync_factory_mock.h" #include "chrome/browser/sync/syncable/model_type.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "content/browser/browser_thread.h" #include "testing/gtest/include/gtest/gtest.h" @@ -38,7 +37,7 @@ class ProfileSyncServiceTestHelper { browser_sync::TestIdFactory* ids); }; -class AbstractProfileSyncServiceTest : public TestingBrowserProcessTest { +class AbstractProfileSyncServiceTest : public testing::Test { public: AbstractProfileSyncServiceTest(); virtual ~AbstractProfileSyncServiceTest(); diff --git a/chrome/browser/sync/backend_migrator_unittest.cc b/chrome/browser/sync/backend_migrator_unittest.cc index d429575..9498392 100644 --- a/chrome/browser/sync/backend_migrator_unittest.cc +++ b/chrome/browser/sync/backend_migrator_unittest.cc @@ -8,7 +8,6 @@ #include "chrome/browser/sync/profile_sync_service_mock.h" #include "chrome/browser/sync/sessions/session_state.h" #include "chrome/common/chrome_notification_types.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" @@ -25,7 +24,7 @@ using sessions::ErrorCounters; using sessions::SyncerStatus; using sessions::SyncSessionSnapshot; -class BackendMigratorTest : public TestingBrowserProcessTest { +class BackendMigratorTest : public testing::Test { public: BackendMigratorTest() { } virtual ~BackendMigratorTest() { } diff --git a/chrome/browser/sync/glue/autofill_data_type_controller_unittest.cc b/chrome/browser/sync/glue/autofill_data_type_controller_unittest.cc index 249bd25..1dd4943 100644 --- a/chrome/browser/sync/glue/autofill_data_type_controller_unittest.cc +++ b/chrome/browser/sync/glue/autofill_data_type_controller_unittest.cc @@ -18,7 +18,6 @@ #include "chrome/browser/sync/profile_sync_test_util.h" #include "chrome/browser/webdata/web_data_service.h" #include "chrome/test/base/profile_mock.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "content/browser/browser_thread.h" #include "content/common/content_notification_types.h" #include "content/common/notification_source.h" @@ -81,7 +80,7 @@ class SignalEventTask : public Task { WaitableEvent* done_event_; }; -class AutofillDataTypeControllerTest : public TestingBrowserProcessTest { +class AutofillDataTypeControllerTest : public testing::Test { public: AutofillDataTypeControllerTest() : ui_thread_(BrowserThread::UI, &message_loop_), diff --git a/chrome/browser/sync/glue/bookmark_data_type_controller_unittest.cc b/chrome/browser/sync/glue/bookmark_data_type_controller_unittest.cc index c956ea6..558e948 100644 --- a/chrome/browser/sync/glue/bookmark_data_type_controller_unittest.cc +++ b/chrome/browser/sync/glue/bookmark_data_type_controller_unittest.cc @@ -17,7 +17,6 @@ #include "chrome/browser/sync/profile_sync_service_mock.h" #include "chrome/common/chrome_notification_types.h" #include "chrome/test/base/profile_mock.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "content/browser/browser_thread.h" #include "content/common/notification_service.h" #include "content/common/notification_source.h" @@ -45,7 +44,7 @@ class BookmarkModelMock : public BookmarkModel { MOCK_CONST_METHOD0(IsLoaded, bool(void)); }; -class BookmarkDataTypeControllerTest : public TestingBrowserProcessTest { +class BookmarkDataTypeControllerTest : public testing::Test { public: BookmarkDataTypeControllerTest() : ui_thread_(BrowserThread::UI, &message_loop_) {} diff --git a/chrome/browser/sync/glue/data_type_manager_impl_unittest.cc b/chrome/browser/sync/glue/data_type_manager_impl_unittest.cc index 2a8d15d..1fa64a7 100644 --- a/chrome/browser/sync/glue/data_type_manager_impl_unittest.cc +++ b/chrome/browser/sync/glue/data_type_manager_impl_unittest.cc @@ -16,7 +16,6 @@ #include "chrome/browser/sync/profile_sync_test_util.h" #include "chrome/browser/sync/syncable/model_type.h" #include "chrome/common/chrome_notification_types.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "content/browser/browser_thread.h" #include "content/common/notification_details.h" #include "content/common/notification_observer_mock.h" @@ -62,7 +61,7 @@ DataTypeManager::ConfigureStatus GetStatus( return result->status; } -class DataTypeManagerImplTest : public TestingBrowserProcessTest { +class DataTypeManagerImplTest : public testing::Test { public: DataTypeManagerImplTest() : ui_thread_(BrowserThread::UI, &message_loop_) {} diff --git a/chrome/browser/sync/glue/extension_data_type_controller_unittest.cc b/chrome/browser/sync/glue/extension_data_type_controller_unittest.cc index ad8a70a..d96ecdb 100644 --- a/chrome/browser/sync/glue/extension_data_type_controller_unittest.cc +++ b/chrome/browser/sync/glue/extension_data_type_controller_unittest.cc @@ -14,7 +14,6 @@ #include "chrome/browser/sync/profile_sync_factory_mock.h" #include "chrome/browser/sync/profile_sync_service_mock.h" #include "chrome/test/base/profile_mock.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "content/browser/browser_thread.h" using browser_sync::ExtensionDataTypeController; @@ -33,7 +32,7 @@ class StartCallback { const tracked_objects::Location& location)); }; -class ExtensionDataTypeControllerTest : public TestingBrowserProcessTest { +class ExtensionDataTypeControllerTest : public testing::Test { public: ExtensionDataTypeControllerTest() : ui_thread_(BrowserThread::UI, &message_loop_) {} diff --git a/chrome/browser/sync/glue/frontend_data_type_controller_unittest.cc b/chrome/browser/sync/glue/frontend_data_type_controller_unittest.cc index 0f7dbc6..cde70e0 100644 --- a/chrome/browser/sync/glue/frontend_data_type_controller_unittest.cc +++ b/chrome/browser/sync/glue/frontend_data_type_controller_unittest.cc @@ -16,7 +16,6 @@ #include "chrome/browser/sync/profile_sync_factory_mock.h" #include "chrome/browser/sync/profile_sync_service_mock.h" #include "chrome/test/base/profile_mock.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "content/browser/browser_thread.h" using browser_sync::ChangeProcessorMock; @@ -82,7 +81,7 @@ class FrontendDataTypeControllerFake : public FrontendDataTypeController { FrontendDataTypeControllerMock* mock_; }; -class FrontendDataTypeControllerTest : public TestingBrowserProcessTest { +class FrontendDataTypeControllerTest : public testing::Test { public: FrontendDataTypeControllerTest() : ui_thread_(BrowserThread::UI, &message_loop_) {} diff --git a/chrome/browser/sync/glue/non_frontend_data_type_controller_unittest.cc b/chrome/browser/sync/glue/non_frontend_data_type_controller_unittest.cc index 0bff68448..601775c 100644 --- a/chrome/browser/sync/glue/non_frontend_data_type_controller_unittest.cc +++ b/chrome/browser/sync/glue/non_frontend_data_type_controller_unittest.cc @@ -19,7 +19,6 @@ #include "chrome/browser/sync/profile_sync_factory_mock.h" #include "chrome/browser/sync/profile_sync_service_mock.h" #include "chrome/test/base/profile_mock.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "content/browser/browser_thread.h" using base::WaitableEvent; @@ -111,7 +110,7 @@ class NonFrontendDataTypeControllerFake : public NonFrontendDataTypeController { NonFrontendDataTypeControllerMock* mock_; }; -class NonFrontendDataTypeControllerTest : public TestingBrowserProcessTest { +class NonFrontendDataTypeControllerTest : public testing::Test { public: NonFrontendDataTypeControllerTest() : ui_thread_(BrowserThread::UI, &message_loop_), diff --git a/chrome/browser/sync/glue/preference_data_type_controller_unittest.cc b/chrome/browser/sync/glue/preference_data_type_controller_unittest.cc index 91031d3..a8411e3 100644 --- a/chrome/browser/sync/glue/preference_data_type_controller_unittest.cc +++ b/chrome/browser/sync/glue/preference_data_type_controller_unittest.cc @@ -15,7 +15,6 @@ #include "chrome/browser/sync/profile_sync_factory_mock.h" #include "chrome/browser/sync/profile_sync_service_mock.h" #include "chrome/test/base/profile_mock.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "content/browser/browser_thread.h" using browser_sync::ChangeProcessorMock; @@ -34,7 +33,7 @@ class StartCallback { const tracked_objects::Location& location)); }; -class PreferenceDataTypeControllerTest : public TestingBrowserProcessTest { +class PreferenceDataTypeControllerTest : public testing::Test { public: PreferenceDataTypeControllerTest() : ui_thread_(BrowserThread::UI, &message_loop_) {} diff --git a/chrome/browser/sync/glue/sync_backend_host_unittest.cc b/chrome/browser/sync/glue/sync_backend_host_unittest.cc index 821ecc0..2418be9 100644 --- a/chrome/browser/sync/glue/sync_backend_host_unittest.cc +++ b/chrome/browser/sync/glue/sync_backend_host_unittest.cc @@ -10,7 +10,6 @@ #include "base/message_loop.h" #include "chrome/browser/sync/engine/model_safe_worker.h" #include "chrome/browser/sync/syncable/model_type.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/test/base/testing_profile.h" #include "chrome/test/base/test_url_request_context_getter.h" #include "content/browser/browser_thread.h" @@ -47,7 +46,7 @@ class MockSyncFrontend : public SyncFrontend { } // namespace -class SyncBackendHostTest : public TestingBrowserProcessTest { +class SyncBackendHostTest : public testing::Test { protected: SyncBackendHostTest() : ui_thread_(BrowserThread::UI, &ui_loop_), diff --git a/chrome/browser/sync/glue/sync_backend_registrar_unittest.cc b/chrome/browser/sync/glue/sync_backend_registrar_unittest.cc index 748a9b5..4d58ab6 100644 --- a/chrome/browser/sync/glue/sync_backend_registrar_unittest.cc +++ b/chrome/browser/sync/glue/sync_backend_registrar_unittest.cc @@ -7,7 +7,6 @@ #include "chrome/browser/sync/glue/change_processor_mock.h" #include "chrome/browser/sync/glue/ui_model_worker.h" #include "chrome/browser/sync/syncable/model_type.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/test/base/testing_profile.h" #include "chrome/test/sync/engine/test_user_share.h" #include "content/browser/browser_thread.h" @@ -33,7 +32,7 @@ using syncable::ModelType; using syncable::ModelTypeFromInt; using syncable::ModelTypeSet; -class SyncBackendRegistrarTest : public TestingBrowserProcessTest { +class SyncBackendRegistrarTest : public testing::Test { protected: SyncBackendRegistrarTest() : ui_thread_(BrowserThread::UI, &loop_) {} diff --git a/chrome/browser/sync/glue/theme_data_type_controller_unittest.cc b/chrome/browser/sync/glue/theme_data_type_controller_unittest.cc index 608c80b..ac7763a 100644 --- a/chrome/browser/sync/glue/theme_data_type_controller_unittest.cc +++ b/chrome/browser/sync/glue/theme_data_type_controller_unittest.cc @@ -14,7 +14,6 @@ #include "chrome/browser/sync/profile_sync_factory_mock.h" #include "chrome/browser/sync/profile_sync_service_mock.h" #include "chrome/test/base/profile_mock.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "content/browser/browser_thread.h" using browser_sync::ThemeDataTypeController; @@ -33,7 +32,7 @@ class StartCallback { const tracked_objects::Location& location)); }; -class ThemeDataTypeControllerTest : public TestingBrowserProcessTest { +class ThemeDataTypeControllerTest : public testing::Test { public: ThemeDataTypeControllerTest() : ui_thread_(BrowserThread::UI, &message_loop_) {} diff --git a/chrome/browser/sync/glue/theme_util_unittest.cc b/chrome/browser/sync/glue/theme_util_unittest.cc index 5491e87..3d728df 100644 --- a/chrome/browser/sync/glue/theme_util_unittest.cc +++ b/chrome/browser/sync/glue/theme_util_unittest.cc @@ -12,7 +12,6 @@ #include "chrome/browser/themes/theme_service_factory.h" #include "chrome/common/extensions/extension.h" #include "chrome/common/extensions/extension_constants.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/test/base/testing_profile.h" #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" @@ -35,7 +34,7 @@ ProfileKeyedService* BuildMockThemeService(Profile* profile) { return new MockThemeService; } -class ThemeUtilTest : public TestingBrowserProcessTest { +class ThemeUtilTest : public testing::Test { protected: MockThemeService* BuildForProfile(Profile* profile) { return static_cast<MockThemeService*>( diff --git a/chrome/browser/sync/profile_sync_factory_impl_unittest.cc b/chrome/browser/sync/profile_sync_factory_impl_unittest.cc index 8ae9611..c7e4345 100644 --- a/chrome/browser/sync/profile_sync_factory_impl_unittest.cc +++ b/chrome/browser/sync/profile_sync_factory_impl_unittest.cc @@ -12,14 +12,13 @@ #include "chrome/browser/sync/profile_sync_factory_impl.h" #include "chrome/browser/sync/profile_sync_service.h" #include "chrome/common/chrome_switches.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/test/base/testing_profile.h" #include "content/browser/browser_thread.h" #include "testing/gtest/include/gtest/gtest.h" using browser_sync::DataTypeController; -class ProfileSyncFactoryImplTest : public TestingBrowserProcessTest { +class ProfileSyncFactoryImplTest : public testing::Test { protected: ProfileSyncFactoryImplTest() : ui_thread_(BrowserThread::UI, &message_loop_) {} diff --git a/chrome/browser/sync/profile_sync_service_bookmark_unittest.cc b/chrome/browser/sync/profile_sync_service_bookmark_unittest.cc index 7aa8221..39e0306 100644 --- a/chrome/browser/sync/profile_sync_service_bookmark_unittest.cc +++ b/chrome/browser/sync/profile_sync_service_bookmark_unittest.cc @@ -31,7 +31,6 @@ #include "chrome/browser/sync/internal_api/write_transaction.h" #include "chrome/browser/sync/syncable/directory_manager.h" #include "chrome/common/chrome_switches.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/test/base/testing_profile.h" #include "chrome/test/sync/engine/test_id_factory.h" #include "chrome/test/sync/engine/test_user_share.h" @@ -278,7 +277,7 @@ class MockUnrecoverableErrorHandler : public UnrecoverableErrorHandler { void(const tracked_objects::Location&, const std::string&)); }; -class ProfileSyncServiceBookmarkTest : public TestingBrowserProcessTest { +class ProfileSyncServiceBookmarkTest : public testing::Test { protected: enum LoadOption { LOAD_FROM_STORAGE, DELETE_EXISTING_STORAGE }; enum SaveOption { SAVE_TO_STORAGE, DONT_SAVE_TO_STORAGE }; diff --git a/chrome/browser/sync/profile_sync_service_startup_unittest.cc b/chrome/browser/sync/profile_sync_service_startup_unittest.cc index ebd8297..92ac816 100644 --- a/chrome/browser/sync/profile_sync_service_startup_unittest.cc +++ b/chrome/browser/sync/profile_sync_service_startup_unittest.cc @@ -18,7 +18,6 @@ #include "chrome/common/net/gaia/gaia_auth_consumer.h" #include "chrome/common/net/gaia/gaia_constants.h" #include "chrome/common/pref_names.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/test/base/testing_profile.h" #include "content/browser/browser_thread.h" #include "testing/gmock/include/gmock/gmock.h" @@ -38,7 +37,7 @@ ACTION_P(InvokeCallback, callback_result) { } // TODO(chron): Test not using cros_user flag and use signin_ -class ProfileSyncServiceStartupTest : public TestingBrowserProcessTest { +class ProfileSyncServiceStartupTest : public testing::Test { public: ProfileSyncServiceStartupTest() : ui_thread_(BrowserThread::UI, &ui_loop_), diff --git a/chrome/browser/sync/profile_sync_service_unittest.cc b/chrome/browser/sync/profile_sync_service_unittest.cc index b13e3c2..b058987 100644 --- a/chrome/browser/sync/profile_sync_service_unittest.cc +++ b/chrome/browser/sync/profile_sync_service_unittest.cc @@ -16,7 +16,6 @@ #include "chrome/browser/sync/test_profile_sync_service.h" #include "chrome/common/net/gaia/gaia_constants.h" #include "chrome/common/pref_names.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/test/base/testing_pref_service.h" #include "chrome/test/base/testing_profile.h" #include "content/browser/browser_thread.h" @@ -37,7 +36,7 @@ using testing::AtMost; using testing::Return; using testing::StrictMock; -class ProfileSyncServiceTest : public TestingBrowserProcessTest { +class ProfileSyncServiceTest : public testing::Test { protected: ProfileSyncServiceTest() : ui_thread_(BrowserThread::UI, &ui_loop_), diff --git a/chrome/browser/tab_contents/thumbnail_generator_unittest.cc b/chrome/browser/tab_contents/thumbnail_generator_unittest.cc index c436584..f7a4780 100644 --- a/chrome/browser/tab_contents/thumbnail_generator_unittest.cc +++ b/chrome/browser/tab_contents/thumbnail_generator_unittest.cc @@ -7,7 +7,6 @@ #include "chrome/browser/history/top_sites.h" #include "chrome/browser/tab_contents/thumbnail_generator.h" #include "chrome/common/render_messages.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/test/base/testing_profile.h" #include "content/browser/renderer_host/backing_store_manager.h" #include "content/browser/renderer_host/backing_store_skia.h" @@ -54,7 +53,7 @@ class TestRenderWidgetHostViewWithBackingStoreSkia DISALLOW_COPY_AND_ASSIGN(TestRenderWidgetHostViewWithBackingStoreSkia); }; -class ThumbnailGeneratorTest : public TestingBrowserProcessTest { +class ThumbnailGeneratorTest : public testing::Test { public: ThumbnailGeneratorTest() { profile_.reset(new TestingProfile()); @@ -208,7 +207,7 @@ TEST_F(ThumbnailGeneratorTest, DiscardBackingStore) { #endif // !defined(OS_MAC) -typedef TestingBrowserProcessTest ThumbnailGeneratorSimpleTest; +typedef testing::Test ThumbnailGeneratorSimpleTest; TEST_F(ThumbnailGeneratorSimpleTest, CalculateBoringScore_Empty) { SkBitmap bitmap; diff --git a/chrome/browser/translate/translate_manager_browsertest.cc b/chrome/browser/translate/translate_manager_browsertest.cc index da6dbf9..0900f3f 100644 --- a/chrome/browser/translate/translate_manager_browsertest.cc +++ b/chrome/browser/translate/translate_manager_browsertest.cc @@ -869,9 +869,8 @@ TEST_F(TranslateManagerTest, ServerReportsUnsupportedLanguage) { // Tests that no translate infobar is shown when Chrome is in a language that // the translate server does not support. TEST_F(TranslateManagerTest, UnsupportedUILanguage) { - TestingBrowserProcess* browser_process = testing_browser_process_.get(); - std::string original_lang = browser_process->GetApplicationLocale(); - browser_process->SetApplicationLocale("qbz"); + std::string original_lang = g_browser_process->GetApplicationLocale(); + g_browser_process->SetApplicationLocale("qbz"); // Make sure that the accept language list only contains unsupported languages Profile* profile = Profile::FromBrowserContext(contents()->browser_context()); @@ -885,15 +884,14 @@ TEST_F(TranslateManagerTest, UnsupportedUILanguage) { // No info-bar should be shown. EXPECT_TRUE(GetTranslateInfoBar() == NULL); - browser_process->SetApplicationLocale(original_lang); + g_browser_process->SetApplicationLocale(original_lang); } // Tests that the first supported accept language is selected TEST_F(TranslateManagerTest, TranslateAcceptLanguage) { // Set locate to non-existant language - TestingBrowserProcess* browser_process = testing_browser_process_.get(); - std::string original_lang = browser_process->GetApplicationLocale(); - browser_process->SetApplicationLocale("qbz"); + std::string original_lang = g_browser_process->GetApplicationLocale(); + g_browser_process->SetApplicationLocale("qbz"); // Set Qbz and French as the only accepted languages Profile* profile = Profile::FromBrowserContext(contents()->browser_context()); diff --git a/chrome/browser/ui/browser_list_unittest.cc b/chrome/browser/ui/browser_list_unittest.cc index ae354b2..7cc6f60 100644 --- a/chrome/browser/ui/browser_list_unittest.cc +++ b/chrome/browser/ui/browser_list_unittest.cc @@ -7,6 +7,7 @@ #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" #include "chrome/common/url_constants.h" #include "chrome/test/base/browser_with_test_window_test.h" +#include "chrome/test/base/testing_browser_process.h" typedef BrowserWithTestWindowTest BrowserListTest; @@ -171,7 +172,8 @@ TEST_F(BrowserListTest, TabContentsIteratorBackgroundPrinting) { EXPECT_EQ(4U, CountAllTabs()); - TestingBrowserProcess* browser_process = testing_browser_process_.get(); + TestingBrowserProcess* browser_process = + static_cast<TestingBrowserProcess*>(g_browser_process); printing::BackgroundPrintingManager* bg_print_manager = browser_process->background_printing_manager(); diff --git a/chrome/browser/ui/cocoa/browser_test_helper.h b/chrome/browser/ui/cocoa/browser_test_helper.h index 4b19662..d2ced88 100644 --- a/chrome/browser/ui/cocoa/browser_test_helper.h +++ b/chrome/browser/ui/cocoa/browser_test_helper.h @@ -42,8 +42,6 @@ class BrowserTestHelper { void CloseBrowserWindow(); private: - ScopedTestingBrowserProcess browser_process_; - scoped_ptr<TestingProfile> profile_; scoped_ptr<Browser> browser_; MessageLoopForUI message_loop_; diff --git a/chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk_unittest.cc b/chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk_unittest.cc index 2538ad5..226cabf 100644 --- a/chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk_unittest.cc +++ b/chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk_unittest.cc @@ -9,7 +9,6 @@ #include "chrome/browser/bookmarks/bookmark_model.h" #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/gtk/tabstrip_origin_provider.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/test/base/testing_profile.h" #include "content/browser/browser_thread.h" #include "testing/gtest/include/gtest/gtest.h" @@ -23,7 +22,7 @@ class EmptyTabstripOriginProvider : public TabstripOriginProvider { } }; -class BookmarkBarGtkUnittest : public TestingBrowserProcessTest { +class BookmarkBarGtkUnittest : public testing::Test { protected: BookmarkBarGtkUnittest() : ui_thread_(BrowserThread::UI, &message_loop_), diff --git a/chrome/browser/ui/gtk/bookmarks/bookmark_editor_gtk_unittest.cc b/chrome/browser/ui/gtk/bookmarks/bookmark_editor_gtk_unittest.cc index 64dd5d1..c8a0a0a 100644 --- a/chrome/browser/ui/gtk/bookmarks/bookmark_editor_gtk_unittest.cc +++ b/chrome/browser/ui/gtk/bookmarks/bookmark_editor_gtk_unittest.cc @@ -11,7 +11,6 @@ #include "chrome/browser/bookmarks/bookmark_model.h" #include "chrome/browser/ui/gtk/bookmarks/bookmark_editor_gtk.h" #include "chrome/browser/ui/gtk/bookmarks/bookmark_tree_model.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/test/base/testing_profile.h" #include "content/browser/browser_thread.h" #include "testing/gtest/include/gtest/gtest.h" @@ -25,7 +24,7 @@ using bookmark_utils::GetTitleFromTreeIter; // GTK-ifications of the corresponding views tests. Testing here is really // important because on Linux, we make round trip copies from chrome's // BookmarkModel class to GTK's native GtkTreeStore. -class BookmarkEditorGtkTest : public TestingBrowserProcessTest { +class BookmarkEditorGtkTest : public testing::Test { public: BookmarkEditorGtkTest() : ui_thread_(BrowserThread::UI, &message_loop_), diff --git a/chrome/browser/ui/gtk/gtk_theme_service_unittest.cc b/chrome/browser/ui/gtk/gtk_theme_service_unittest.cc index 40c2b24..e1099af 100644 --- a/chrome/browser/ui/gtk/gtk_theme_service_unittest.cc +++ b/chrome/browser/ui/gtk/gtk_theme_service_unittest.cc @@ -8,7 +8,6 @@ #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/gtk/gtk_theme_service.h" #include "chrome/common/pref_names.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/test/base/testing_profile.h" #include "grit/theme_resources.h" #include "testing/gtest/include/gtest/gtest.h" @@ -24,7 +23,7 @@ SkColor GdkToSkColor(GdkColor* color) { } // namespace -class GtkThemeServiceTest : public TestingBrowserProcessTest { +class GtkThemeServiceTest : public testing::Test { public: GtkThemeServiceTest() : provider_(NULL) {} diff --git a/chrome/browser/ui/intents/intents_model_unittest.cc b/chrome/browser/ui/intents/intents_model_unittest.cc index 175e546..7bcefbb 100644 --- a/chrome/browser/ui/intents/intents_model_unittest.cc +++ b/chrome/browser/ui/intents/intents_model_unittest.cc @@ -9,12 +9,11 @@ #include "base/utf_string_conversions.h" #include "chrome/browser/intents/web_intents_registry.h" #include "chrome/browser/webdata/web_data_service.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/browser/ui/intents/intents_model.h" #include "testing/gtest/include/gtest/gtest.h" #include "ui/base/models/tree_node_model.h" -class IntentsModelTest : public TestingBrowserProcessTest { +class IntentsModelTest : public testing::Test { public: IntentsModelTest() : ui_thread_(BrowserThread::UI, &message_loop_), diff --git a/chrome/browser/ui/search_engines/keyword_editor_controller_unittest.cc b/chrome/browser/ui/search_engines/keyword_editor_controller_unittest.cc index be902dc..36c6a52 100644 --- a/chrome/browser/ui/search_engines/keyword_editor_controller_unittest.cc +++ b/chrome/browser/ui/search_engines/keyword_editor_controller_unittest.cc @@ -12,7 +12,6 @@ #include "chrome/browser/ui/search_engines/template_url_table_model.h" #include "chrome/common/chrome_notification_types.h" #include "chrome/common/pref_names.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/test/base/testing_pref_service.h" #include "chrome/test/base/testing_profile.h" #include "content/common/notification_details.h" @@ -27,7 +26,7 @@ static const string16 kB1(ASCIIToUTF16("b1")); // Base class for keyword editor tests. Creates a profile containing an // empty TemplateURLService. -class KeywordEditorControllerTest : public TestingBrowserProcessTest, +class KeywordEditorControllerTest : public testing::Test, public ui::TableModelObserver { public: // Initializes all of the state. diff --git a/chrome/browser/ui/shell_dialogs_unittest.cc b/chrome/browser/ui/shell_dialogs_unittest.cc index f07f51f..8656485 100644 --- a/chrome/browser/ui/shell_dialogs_unittest.cc +++ b/chrome/browser/ui/shell_dialogs_unittest.cc @@ -6,11 +6,12 @@ #include "base/file_util.h" #include "base/string16.h" #include "base/values.h" +#include "chrome/browser/browser_process.h" #include "chrome/browser/prefs/pref_service.h" #include "chrome/browser/prefs/browser_prefs.h" #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/shell_dialogs.h" -#include "chrome/test/base/testing_browser_process_test.h" +#include "chrome/test/base/testing_browser_process.h" #include "chrome/test/base/testing_pref_service.h" #include "chrome/common/pref_names.h" #include "testing/gtest/include/gtest/gtest.h" @@ -66,7 +67,7 @@ class FileSelectionUser : public SelectFileDialog::Listener { bool file_selection_initialisation_in_progress; }; -typedef TestingBrowserProcessTest FileSelectionDialogTest; +typedef testing::Test FileSelectionDialogTest; // Tests if SelectFileDialog::SelectFile returns asynchronously with // file-selection dialogs disabled by policy. @@ -74,12 +75,13 @@ TEST_F(FileSelectionDialogTest, ExpectAsynchronousListenerCall) { MessageLoopForUI message_loop; BrowserThread ui_thread(BrowserThread::UI, &message_loop); - ScopedTestingLocalState local_state_(testing_browser_process_.get()); + ScopedTestingLocalState local_state( + static_cast<TestingBrowserProcess*>(g_browser_process)); scoped_ptr<FileSelectionUser> file_selection_user(new FileSelectionUser()); // Disallow file-selection dialogs. - local_state_.Get()->SetManagedPref( + local_state.Get()->SetManagedPref( prefs::kAllowFileSelectionDialogs, Value::CreateBooleanValue(false)); diff --git a/chrome/browser/ui/toolbar/encoding_menu_controller_unittest.cc b/chrome/browser/ui/toolbar/encoding_menu_controller_unittest.cc index 76a16af..0dc0216 100644 --- a/chrome/browser/ui/toolbar/encoding_menu_controller_unittest.cc +++ b/chrome/browser/ui/toolbar/encoding_menu_controller_unittest.cc @@ -11,11 +11,10 @@ #include "chrome/browser/prefs/pref_service.h" #include "chrome/browser/profiles/profile.h" #include "chrome/common/pref_names.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/test/base/testing_profile.h" #include "testing/gtest/include/gtest/gtest.h" -class EncodingMenuControllerTest : public TestingBrowserProcessTest { +class EncodingMenuControllerTest : public testing::Test { }; TEST_F(EncodingMenuControllerTest, EncodingIDsBelongTest) { diff --git a/chrome/browser/ui/views/accessibility_event_router_views_unittest.cc b/chrome/browser/ui/views/accessibility_event_router_views_unittest.cc index 853c4ec..24649bd 100644 --- a/chrome/browser/ui/views/accessibility_event_router_views_unittest.cc +++ b/chrome/browser/ui/views/accessibility_event_router_views_unittest.cc @@ -10,7 +10,6 @@ #include "chrome/browser/extensions/extension_accessibility_api.h" #include "chrome/browser/ui/views/accessibility_event_router_views.h" #include "chrome/common/chrome_notification_types.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/test/base/testing_profile.h" #include "content/common/notification_registrar.h" #include "content/common/notification_service.h" @@ -90,7 +89,7 @@ class AccessibilityWindowDelegate : public views::WidgetDelegate { }; class AccessibilityEventRouterViewsTest - : public TestingBrowserProcessTest, + : public testing::Test, public NotificationObserver { public: virtual void SetUp() { diff --git a/chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc b/chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc index 51b87b7..c033a9d 100644 --- a/chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc +++ b/chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc @@ -288,7 +288,6 @@ class BookmarkBarViewEventTestBase : public ViewEventTestBase { } gfx::Size bb_view_pref_; - ScopedTestingBrowserProcess testing_browser_process_; scoped_ptr<TestingProfile> profile_; scoped_ptr<Browser> browser_; BrowserThread ui_thread_; diff --git a/chrome/browser/ui/views/bookmarks/bookmark_context_menu_test.cc b/chrome/browser/ui/views/bookmarks/bookmark_context_menu_test.cc index 15c4327..43b5020 100644 --- a/chrome/browser/ui/views/bookmarks/bookmark_context_menu_test.cc +++ b/chrome/browser/ui/views/bookmarks/bookmark_context_menu_test.cc @@ -13,7 +13,6 @@ #include "chrome/browser/bookmarks/bookmark_utils.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/views/bookmarks/bookmark_context_menu.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/test/base/testing_profile.h" #include "content/browser/browser_thread.h" #include "content/browser/tab_contents/page_navigator.h" @@ -49,7 +48,7 @@ class TestingPageNavigator : public PageNavigator { } // namespace -class BookmarkContextMenuTest : public TestingBrowserProcessTest { +class BookmarkContextMenuTest : public testing::Test { public: BookmarkContextMenuTest() : ui_thread_(BrowserThread::UI, &message_loop_), diff --git a/chrome/browser/ui/views/bookmarks/bookmark_editor_view_unittest.cc b/chrome/browser/ui/views/bookmarks/bookmark_editor_view_unittest.cc index cf481ff..3b37cc5 100644 --- a/chrome/browser/ui/views/bookmarks/bookmark_editor_view_unittest.cc +++ b/chrome/browser/ui/views/bookmarks/bookmark_editor_view_unittest.cc @@ -10,7 +10,6 @@ #include "chrome/browser/bookmarks/bookmark_model.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/views/bookmarks/bookmark_editor_view.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/test/base/testing_profile.h" #include "content/browser/browser_thread.h" #include "testing/gtest/include/gtest/gtest.h" @@ -20,7 +19,7 @@ using base::TimeDelta; // Base class for bookmark editor tests. Creates a BookmarkModel and populates // it with test data. -class BookmarkEditorViewTest : public TestingBrowserProcessTest { +class BookmarkEditorViewTest : public testing::Test { public: BookmarkEditorViewTest() : ui_thread_(BrowserThread::UI, &message_loop_), diff --git a/chrome/browser/ui/views/extensions/browser_action_drag_data_unittest.cc b/chrome/browser/ui/views/extensions/browser_action_drag_data_unittest.cc index 91a4774..7e57cee 100644 --- a/chrome/browser/ui/views/extensions/browser_action_drag_data_unittest.cc +++ b/chrome/browser/ui/views/extensions/browser_action_drag_data_unittest.cc @@ -4,7 +4,6 @@ #include "base/pickle.h" #include "chrome/browser/ui/views/extensions/browser_action_drag_data.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/test/base/testing_profile.h" #include "googleurl/src/gurl.h" #include "testing/gtest/include/gtest/gtest.h" @@ -20,7 +19,7 @@ ui::OSExchangeData::Provider* CloneProvider(const ui::OSExchangeData& data) { } // namespace -typedef TestingBrowserProcessTest BrowserActionDragDataTest; +typedef testing::Test BrowserActionDragDataTest; TEST_F(BrowserActionDragDataTest, ArbitraryFormat) { TestingProfile profile; diff --git a/chrome/browser/ui/webui/options/language_options_handler_unittest.cc b/chrome/browser/ui/webui/options/language_options_handler_unittest.cc index e65985d..5c37af5 100644 --- a/chrome/browser/ui/webui/options/language_options_handler_unittest.cc +++ b/chrome/browser/ui/webui/options/language_options_handler_unittest.cc @@ -8,7 +8,6 @@ #include "base/memory/scoped_ptr.h" #include "base/values.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "testing/gtest/include/gtest/gtest.h" #if defined(OS_CHROMEOS) @@ -92,8 +91,6 @@ TEST(LanguageOptionsHandlerTest, GetInputMethodList) { } TEST(LanguageOptionsHandlerTest, GetLanguageList) { - ScopedTestingBrowserProcess browser_process; - InputMethodDescriptors descriptors = CreateInputMethodDescriptors(); scoped_ptr<ListValue> list( chromeos::CrosLanguageOptionsHandler::GetLanguageList(descriptors)); diff --git a/chrome/browser/ui/webui/theme_source_unittest.cc b/chrome/browser/ui/webui/theme_source_unittest.cc index cebbabb..0e358a0 100644 --- a/chrome/browser/ui/webui/theme_source_unittest.cc +++ b/chrome/browser/ui/webui/theme_source_unittest.cc @@ -6,7 +6,6 @@ #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/webui/theme_source.h" #include "chrome/common/url_constants.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/test/base/testing_profile.h" #include "content/browser/browser_thread.h" #include "grit/theme_resources.h" @@ -34,7 +33,7 @@ class MockThemeSource : public ThemeSource { ~MockThemeSource() {} }; -class WebUISourcesTest : public TestingBrowserProcessTest { +class WebUISourcesTest : public testing::Test { public: WebUISourcesTest() : ui_thread_(BrowserThread::UI, MessageLoop::current()) {} diff --git a/chrome/browser/user_style_sheet_watcher_unittest.cc b/chrome/browser/user_style_sheet_watcher_unittest.cc index 01a497c..be80718 100644 --- a/chrome/browser/user_style_sheet_watcher_unittest.cc +++ b/chrome/browser/user_style_sheet_watcher_unittest.cc @@ -16,8 +16,6 @@ #include "testing/gtest/include/gtest/gtest.h" TEST(UserStyleSheetWatcherTest, StyleLoad) { - ScopedTestingBrowserProcess browser_process; - ScopedTempDir dir; ASSERT_TRUE(dir.CreateUniqueTempDir()); diff --git a/chrome/browser/visitedlink/visitedlink_unittest.cc b/chrome/browser/visitedlink/visitedlink_unittest.cc index 36d78c7..3d5d59e 100644 --- a/chrome/browser/visitedlink/visitedlink_unittest.cc +++ b/chrome/browser/visitedlink/visitedlink_unittest.cc @@ -16,7 +16,6 @@ #include "chrome/browser/visitedlink/visitedlink_event_listener.h" #include "chrome/common/render_messages.h" #include "chrome/renderer/visitedlink_slave.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/test/base/testing_profile.h" #include "content/browser/browser_thread.h" #include "content/browser/renderer_host/browser_render_process_host.h" @@ -73,7 +72,7 @@ class TrackingVisitedLinkEventListener : public VisitedLinkMaster::Listener { int add_count_; }; -class VisitedLinkTest : public TestingBrowserProcessTest { +class VisitedLinkTest : public testing::Test { protected: VisitedLinkTest() : ui_thread_(BrowserThread::UI, &message_loop_), diff --git a/chrome/browser/web_resource/promo_resource_service_unittest.cc b/chrome/browser/web_resource/promo_resource_service_unittest.cc index 5dd9c63..b196b12 100644 --- a/chrome/browser/web_resource/promo_resource_service_unittest.cc +++ b/chrome/browser/web_resource/promo_resource_service_unittest.cc @@ -6,20 +6,21 @@ #include "base/time.h" #include "base/utf_string_conversions.h" #include "base/values.h" +#include "chrome/browser/browser_process.h" #include "chrome/browser/extensions/apps_promo.h" #include "chrome/browser/prefs/browser_prefs.h" #include "chrome/browser/prefs/pref_service.h" #include "chrome/browser/web_resource/promo_resource_service.h" #include "chrome/common/pref_names.h" -#include "chrome/test/base/testing_browser_process_test.h" +#include "chrome/test/base/testing_browser_process.h" #include "chrome/test/base/testing_pref_service.h" #include "chrome/test/base/testing_profile.h" #include "testing/gtest/include/gtest/gtest.h" -class PromoResourceServiceTest : public TestingBrowserProcessTest { +class PromoResourceServiceTest : public testing::Test { public: PromoResourceServiceTest() - : local_state_(testing_browser_process_.get()), + : local_state_(static_cast<TestingBrowserProcess*>(g_browser_process)), web_resource_service_(new PromoResourceService(&profile_)) { } diff --git a/chrome/browser/webdata/autofill_table_unittest.cc b/chrome/browser/webdata/autofill_table_unittest.cc index eec2f21..ca37e70 100644 --- a/chrome/browser/webdata/autofill_table_unittest.cc +++ b/chrome/browser/webdata/autofill_table_unittest.cc @@ -19,7 +19,6 @@ #include "chrome/browser/webdata/web_database.h" #include "chrome/common/chrome_paths.h" #include "chrome/common/guid.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "sql/statement.h" #include "testing/gtest/include/gtest/gtest.h" #include "webkit/glue/form_field.h" @@ -82,7 +81,7 @@ bool CompareAutofillEntries(const AutofillEntry& a, const AutofillEntry& b) { } // anonymous namespace -class AutofillTableTest : public TestingBrowserProcessTest { +class AutofillTableTest : public testing::Test { public: AutofillTableTest() {} virtual ~AutofillTableTest() {} diff --git a/chrome/browser/webdata/web_data_service_unittest.cc b/chrome/browser/webdata/web_data_service_unittest.cc index 33fc6e0..786c4b8 100644 --- a/chrome/browser/webdata/web_data_service_unittest.cc +++ b/chrome/browser/webdata/web_data_service_unittest.cc @@ -27,7 +27,6 @@ #include "chrome/common/chrome_notification_types.h" #include "chrome/common/chrome_paths.h" #include "chrome/common/guid.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/test/base/thread_observer_helper.h" #include "content/browser/browser_thread.h" #include "content/common/notification_details.h" @@ -68,7 +67,7 @@ class AutofillDBThreadObserverHelper : public DBThreadObserverHelper { } }; -class WebDataServiceTest : public TestingBrowserProcessTest { +class WebDataServiceTest : public testing::Test { public: WebDataServiceTest() : ui_thread_(BrowserThread::UI, &message_loop_), diff --git a/chrome/browser/webdata/web_database_migration_unittest.cc b/chrome/browser/webdata/web_database_migration_unittest.cc index 7acf56e..e6e7355 100644 --- a/chrome/browser/webdata/web_database_migration_unittest.cc +++ b/chrome/browser/webdata/web_database_migration_unittest.cc @@ -20,7 +20,6 @@ #include "chrome/browser/webdata/web_database.h" #include "chrome/common/chrome_paths.h" #include "chrome/common/guid.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/test/base/ui_test_utils.h" #include "sql/statement.h" #include "testing/gtest/include/gtest/gtest.h" @@ -128,7 +127,7 @@ void CreditCard32FromStatement(const sql::Statement& s, // Specifically, these tests are intended to exercise any schema changes in // the WebDatabase and data migrations that occur in // |WebDatabase::MigrateOldVersionsAsNeeded()|. -class WebDatabaseMigrationTest : public TestingBrowserProcessTest { +class WebDatabaseMigrationTest : public testing::Test { public: WebDatabaseMigrationTest() {} virtual ~WebDatabaseMigrationTest() {} diff --git a/chrome/chrome_tests.gypi b/chrome/chrome_tests.gypi index 020dede..8270b74 100644 --- a/chrome/chrome_tests.gypi +++ b/chrome/chrome_tests.gypi @@ -180,7 +180,6 @@ 'test/base/test_url_request_context_getter.h', 'test/base/testing_browser_process.cc', 'test/base/testing_browser_process.h', - 'test/base/testing_browser_process_test.h', 'test/base/testing_pref_service.cc', 'test/base/testing_pref_service.h', 'test/base/testing_profile.cc', diff --git a/chrome/common/net/gaia/gaia_auth_fetcher_unittest.cc b/chrome/common/net/gaia/gaia_auth_fetcher_unittest.cc index 6f12911..42dbe32 100644 --- a/chrome/common/net/gaia/gaia_auth_fetcher_unittest.cc +++ b/chrome/common/net/gaia/gaia_auth_fetcher_unittest.cc @@ -16,7 +16,6 @@ #include "chrome/common/net/gaia/gaia_urls.h" #include "chrome/common/net/gaia/google_service_auth_error.h" #include "chrome/common/net/http_return.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/test/base/testing_profile.h" #include "content/common/url_fetcher.h" #include "content/test/test_url_fetcher_factory.h" @@ -62,7 +61,7 @@ void MockFetcher::Start() { } -class GaiaAuthFetcherTest : public TestingBrowserProcessTest { +class GaiaAuthFetcherTest : public testing::Test { public: GaiaAuthFetcherTest() : client_login_source_(GaiaUrls::GetInstance()->client_login_url()), diff --git a/chrome/common/net/gaia/gaia_oauth_client_unittest.cc b/chrome/common/net/gaia/gaia_oauth_client_unittest.cc index 16282cd..d204a79 100644 --- a/chrome/common/net/gaia/gaia_oauth_client_unittest.cc +++ b/chrome/common/net/gaia/gaia_oauth_client_unittest.cc @@ -11,7 +11,6 @@ #include "base/string_util.h" #include "chrome/common/net/gaia/gaia_oauth_client.h" #include "chrome/common/net/http_return.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/test/base/testing_profile.h" #include "content/common/url_fetcher.h" #include "content/test/test_url_fetcher_factory.h" @@ -124,7 +123,7 @@ const std::string kDummyRefreshTokenResult = namespace gaia { -class GaiaOAuthClientTest : public TestingBrowserProcessTest { +class GaiaOAuthClientTest : public testing::Test { public: GaiaOAuthClientTest() {} diff --git a/chrome/test/base/browser_with_test_window_test.cc b/chrome/test/base/browser_with_test_window_test.cc index 1bdc229..3de42a4 100644 --- a/chrome/test/base/browser_with_test_window_test.cc +++ b/chrome/test/base/browser_with_test_window_test.cc @@ -29,7 +29,7 @@ BrowserWithTestWindowTest::BrowserWithTestWindowTest() } void BrowserWithTestWindowTest::SetUp() { - TestingBrowserProcessTest::SetUp(); + testing::Test::SetUp(); profile_.reset(CreateProfile()); browser_.reset(new Browser(Browser::TYPE_TABBED, profile())); diff --git a/chrome/test/base/browser_with_test_window_test.h b/chrome/test/base/browser_with_test_window_test.h index 9615b6c..4f32979 100644 --- a/chrome/test/base/browser_with_test_window_test.h +++ b/chrome/test/base/browser_with_test_window_test.h @@ -9,7 +9,6 @@ #include "base/message_loop.h" #include "chrome/browser/ui/browser.h" #include "chrome/test/base/test_browser_window.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/test/base/testing_profile.h" #include "content/browser/browser_thread.h" #include "content/browser/renderer_host/test_render_view_host.h" @@ -39,7 +38,7 @@ class NavigationController; // // Subclasses must invoke BrowserWithTestWindowTest::SetUp as it is responsible // for creating the various objects of this class. -class BrowserWithTestWindowTest : public TestingBrowserProcessTest { +class BrowserWithTestWindowTest : public testing::Test { public: BrowserWithTestWindowTest(); virtual ~BrowserWithTestWindowTest(); diff --git a/chrome/test/base/chrome_test_suite.cc b/chrome/test/base/chrome_test_suite.cc index 9661bf7..fa02aa9 100644 --- a/chrome/test/base/chrome_test_suite.cc +++ b/chrome/test/base/chrome_test_suite.cc @@ -5,21 +5,29 @@ #include "chrome/test/base/chrome_test_suite.h" #include "base/command_line.h" +#include "base/file_util.h" #include "base/mac/scoped_nsautorelease_pool.h" +#include "base/memory/ref_counted.h" #include "base/metrics/stats_table.h" +#include "base/path_service.h" #include "base/process_util.h" #include "base/stringprintf.h" #include "base/utf_string_conversions.h" #include "chrome/browser/browser_process.h" +#include "chrome/browser/chrome_content_browser_client.h" #include "chrome/common/chrome_constants.h" #include "chrome/common/chrome_content_client.h" #include "chrome/common/chrome_paths.h" #include "chrome/common/url_constants.h" #include "chrome/test/base/testing_browser_process.h" #include "content/common/content_paths.h" +#include "net/base/mock_host_resolver.h" #include "net/base/net_errors.h" +#include "net/base/net_util.h" +#include "testing/gtest/include/gtest/gtest.h" #include "ui/base/resource/resource_bundle.h" #include "ui/base/ui_base_paths.h" + #if defined(TOOLKIT_VIEWS) #include "views/view.h" #endif @@ -33,7 +41,9 @@ #include "base/shared_memory.h" #endif -static void RemoveSharedMemoryFile(const std::string& filename) { +namespace { + +void RemoveSharedMemoryFile(const std::string& filename) { // Stats uses SharedMemory under the hood. On posix, this results in a file // on disk. #if defined(OS_POSIX) @@ -42,49 +52,108 @@ static void RemoveSharedMemoryFile(const std::string& filename) { #endif } -LocalHostResolverProc::LocalHostResolverProc() - : HostResolverProc(NULL) { -} +// In many cases it may be not obvious that a test makes a real DNS lookup. +// We generally don't want to rely on external DNS servers for our tests, +// so this host resolver procedure catches external queries and returns a failed +// lookup result. +class LocalHostResolverProc : public net::HostResolverProc { + public: + LocalHostResolverProc() : HostResolverProc(NULL) { + } -LocalHostResolverProc::~LocalHostResolverProc() { -} + virtual int Resolve(const std::string& host, + net::AddressFamily address_family, + net::HostResolverFlags host_resolver_flags, + net::AddressList* addrlist, + int* os_error) { + const char* kLocalHostNames[] = {"localhost", "127.0.0.1", "::1"}; + bool local = false; + + if (host == net::GetHostName()) { + local = true; + } else { + for (size_t i = 0; i < arraysize(kLocalHostNames); i++) + if (host == kLocalHostNames[i]) { + local = true; + break; + } + } + + // To avoid depending on external resources and to reduce (if not preclude) + // network interactions from tests, we simulate failure for non-local DNS + // queries, rather than perform them. + // If you really need to make an external DNS query, use + // net::RuleBasedHostResolverProc and its AllowDirectLookup method. + if (!local) { + DVLOG(1) << "To avoid external dependencies, simulating failure for " + "external DNS lookup of " << host; + return net::ERR_NOT_IMPLEMENTED; + } + + return ResolveUsingPrevious(host, address_family, host_resolver_flags, + addrlist, os_error); + } +}; + +class ChromeTestSuiteInitializer : public testing::EmptyTestEventListener { + public: + ChromeTestSuiteInitializer() { + } + + virtual void OnTestStart(const testing::TestInfo& test_info) OVERRIDE { + DCHECK(!g_browser_process); + g_browser_process = new TestingBrowserProcess; -int LocalHostResolverProc::Resolve(const std::string& host, - net::AddressFamily address_family, - net::HostResolverFlags host_resolver_flags, - net::AddressList* addrlist, - int* os_error) { - const char* kLocalHostNames[] = {"localhost", "127.0.0.1", "::1"}; - bool local = false; - - if (host == net::GetHostName()) { - local = true; - } else { - for (size_t i = 0; i < arraysize(kLocalHostNames); i++) - if (host == kLocalHostNames[i]) { - local = true; - break; - } + DCHECK(!content::GetContentClient()); + content_client_.reset(new chrome::ChromeContentClient); + browser_content_client_.reset(new chrome::ChromeContentBrowserClient()); + content_client_->set_browser(browser_content_client_.get()); + content::SetContentClient(content_client_.get()); + + SetUpHostResolver(); } - // To avoid depending on external resources and to reduce (if not preclude) - // network interactions from tests, we simulate failure for non-local DNS - // queries, rather than perform them. - // If you really need to make an external DNS query, use - // net::RuleBasedHostResolverProc and its AllowDirectLookup method. - if (!local) { - DVLOG(1) << "To avoid external dependencies, simulating failure for " - "external DNS lookup of " << host; - return net::ERR_NOT_IMPLEMENTED; + virtual void OnTestEnd(const testing::TestInfo& test_info) OVERRIDE { + if (g_browser_process) { + delete g_browser_process; + g_browser_process = NULL; + } + + DCHECK_EQ(content_client_.get(), content::GetContentClient()); + browser_content_client_.reset(); + content_client_.reset(); + content::SetContentClient(NULL); + + TearDownHostResolver(); } - return ResolveUsingPrevious(host, address_family, host_resolver_flags, - addrlist, os_error); -} + private: + void SetUpHostResolver() { + host_resolver_proc_ = new LocalHostResolverProc; + scoped_host_resolver_proc_.reset( + new net::ScopedDefaultHostResolverProc(host_resolver_proc_.get())); + } + + void TearDownHostResolver() { + scoped_host_resolver_proc_.reset(); + host_resolver_proc_ = NULL; + } + + scoped_ptr<BrowserProcess> browser_process_; + + scoped_ptr<chrome::ChromeContentClient> content_client_; + scoped_ptr<chrome::ChromeContentBrowserClient> browser_content_client_; + + scoped_refptr<LocalHostResolverProc> host_resolver_proc_; + scoped_ptr<net::ScopedDefaultHostResolverProc> scoped_host_resolver_proc_; + + DISALLOW_COPY_AND_ASSIGN(ChromeTestSuiteInitializer); +}; + +} // namespace ChromeTestSuite::ChromeTestSuite(int argc, char** argv) - : base::TestSuite(argc, argv), - stats_table_(NULL) { + : base::TestSuite(argc, argv) { } ChromeTestSuite::~ChromeTestSuite() { @@ -99,13 +168,7 @@ void ChromeTestSuite::Initialize() { base::TestSuite::Initialize(); - // Initialize the content client which that code uses to talk to Chrome. - content::SetContentClient(&chrome_content_client_); - content::GetContentClient()->set_browser(&chrome_browser_content_client_); - chrome::RegisterChromeSchemes(); - host_resolver_proc_ = new LocalHostResolverProc(); - scoped_host_resolver_proc_.Init(host_resolver_proc_.get()); chrome::RegisterPathProvider(); content::RegisterPathProvider(); @@ -133,19 +196,20 @@ void ChromeTestSuite::Initialize() { resources_pack_path.Append(FILE_PATH_LITERAL("resources.pak")); ResourceBundle::AddDataPackToSharedInstance(resources_pack_path); - // initialize the global StatsTable for unit_tests (make sure the file - // doesn't exist before opening it so the test gets a clean slate) - stats_filename_ = "unit_tests"; - std::string pid_string = base::StringPrintf("-%d", base::GetCurrentProcId()); - stats_filename_ += pid_string; - RemoveSharedMemoryFile(stats_filename_); - stats_table_ = new base::StatsTable(stats_filename_, 20, 200); - base::StatsTable::set_current(stats_table_); - #if defined(TOOLKIT_VIEWS) && defined(OS_LINUX) // Turn of GPU compositing in browser during unit tests. views::View::set_use_acceleration_when_possible(false); #endif + + stats_filename_ = base::StringPrintf("unit_tests-%d", + base::GetCurrentProcId()); + RemoveSharedMemoryFile(stats_filename_); + stats_table_.reset(new base::StatsTable(stats_filename_, 20, 200)); + base::StatsTable::set_current(stats_table_.get()); + + testing::TestEventListeners& listeners = + testing::UnitTest::GetInstance()->listeners(); + listeners.Append(new ChromeTestSuiteInitializer); } void ChromeTestSuite::Shutdown() { @@ -155,9 +219,8 @@ void ChromeTestSuite::Shutdown() { base::mac::SetOverrideAppBundle(NULL); #endif - // Tear down shared StatsTable; prevents unit_tests from leaking it. base::StatsTable::set_current(NULL); - delete stats_table_; + stats_table_.reset(); RemoveSharedMemoryFile(stats_filename_); base::TestSuite::Shutdown(); diff --git a/chrome/test/base/chrome_test_suite.h b/chrome/test/base/chrome_test_suite.h index 1a52ece..14f2f7b 100644 --- a/chrome/test/base/chrome_test_suite.h +++ b/chrome/test/base/chrome_test_suite.h @@ -8,39 +8,15 @@ #include <string> -#include "build/build_config.h" - -#include "base/file_util.h" -#include "base/memory/ref_counted.h" -#include "base/path_service.h" +#include "base/file_path.h" +#include "base/memory/scoped_ptr.h" #include "base/test/test_suite.h" #include "chrome/app/scoped_ole_initializer.h" -#include "chrome/browser/chrome_content_browser_client.h" -#include "chrome/common/chrome_content_client.h" -#include "testing/gtest/include/gtest/gtest.h" -#include "net/base/mock_host_resolver.h" -#include "net/base/net_util.h" namespace base { class StatsTable; } -// In many cases it may be not obvious that a test makes a real DNS lookup. -// We generally don't want to rely on external DNS servers for our tests, -// so this host resolver procedure catches external queries and returns a failed -// lookup result. -class LocalHostResolverProc : public net::HostResolverProc { - public: - LocalHostResolverProc(); - virtual ~LocalHostResolverProc(); - - virtual int Resolve(const std::string& host, - net::AddressFamily address_family, - net::HostResolverFlags host_resolver_flags, - net::AddressList* addrlist, - int* os_error); -}; - class ChromeTestSuite : public base::TestSuite { public: ChromeTestSuite(int argc, char** argv); @@ -54,22 +30,13 @@ class ChromeTestSuite : public base::TestSuite { browser_dir_ = browser_dir; } - // Client for embedding content in Chrome. - chrome::ChromeContentClient chrome_content_client_; - chrome::ChromeContentBrowserClient chrome_browser_content_client_; - - base::StatsTable* stats_table_; - - // The name used for the stats file so it can be cleaned up on posix during - // test shutdown. - std::string stats_filename_; - // Alternative path to browser binaries. FilePath browser_dir_; + std::string stats_filename_; + scoped_ptr<base::StatsTable> stats_table_; + ScopedOleInitializer ole_initializer_; - scoped_refptr<LocalHostResolverProc> host_resolver_proc_; - net::ScopedDefaultHostResolverProc scoped_host_resolver_proc_; }; #endif // CHROME_TEST_BASE_CHROME_TEST_SUITE_H_ diff --git a/chrome/test/base/in_process_browser_test.cc b/chrome/test/base/in_process_browser_test.cc index 52cebdd6..d8d621f 100644 --- a/chrome/test/base/in_process_browser_test.cc +++ b/chrome/test/base/in_process_browser_test.cc @@ -95,7 +95,11 @@ void InProcessBrowserTest::SetUp() { ASSERT_TRUE(CreateUserDataDirectory()) << "Could not create user data directory."; - DCHECK(!g_browser_process); + // Undo TestingBrowserProcess creation in ChromeTestSuite. + // TODO(phajdan.jr): Extract a smaller test suite so we don't need this. + DCHECK(g_browser_process); + delete g_browser_process; + g_browser_process = NULL; // Allow subclasses the opportunity to make changes to the default user data // dir before running any tests. diff --git a/chrome/test/base/testing_browser_process.cc b/chrome/test/base/testing_browser_process.cc index 315c2c2..f86f6d5 100644 --- a/chrome/test/base/testing_browser_process.cc +++ b/chrome/test/base/testing_browser_process.cc @@ -271,13 +271,3 @@ void TestingBrowserProcess::SetIOThread(IOThread* io_thread) { void TestingBrowserProcess::SetDevToolsManager(DevToolsManager* manager) { devtools_manager_.reset(manager); } - -ScopedTestingBrowserProcess::ScopedTestingBrowserProcess() { - DCHECK(!g_browser_process); - g_browser_process = &browser_process_; -} - -ScopedTestingBrowserProcess::~ScopedTestingBrowserProcess() { - DCHECK_EQ(&browser_process_, g_browser_process); - g_browser_process = NULL; -} diff --git a/chrome/test/base/testing_browser_process.h b/chrome/test/base/testing_browser_process.h index 57eeda8c..5659875 100644 --- a/chrome/test/base/testing_browser_process.h +++ b/chrome/test/base/testing_browser_process.h @@ -148,20 +148,4 @@ class TestingBrowserProcess : public BrowserProcess { DISALLOW_COPY_AND_ASSIGN(TestingBrowserProcess); }; -// Scoper to put a TestingBrowserProcess in |g_browser_process|. -class ScopedTestingBrowserProcess { - public: - ScopedTestingBrowserProcess(); - ~ScopedTestingBrowserProcess(); - - TestingBrowserProcess* get() { - return &browser_process_; - } - - private: - TestingBrowserProcess browser_process_; - - DISALLOW_COPY_AND_ASSIGN(ScopedTestingBrowserProcess); -}; - #endif // CHROME_TEST_BASE_TESTING_BROWSER_PROCESS_H_ diff --git a/chrome/test/base/testing_browser_process_test.h b/chrome/test/base/testing_browser_process_test.h deleted file mode 100644 index eb37025..0000000 --- a/chrome/test/base/testing_browser_process_test.h +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef CHROME_TEST_BASE_TESTING_BROWSER_PROCESS_TEST_H_ -#define CHROME_TEST_BASE_TESTING_BROWSER_PROCESS_TEST_H_ -#pragma once - -#include "chrome/test/base/testing_browser_process.h" -#include "testing/gtest/include/gtest/gtest.h" - -// Base class for tests that need |g_browser_process| to be initialized. -class TestingBrowserProcessTest : public testing::Test { - protected: - ScopedTestingBrowserProcess testing_browser_process_; -}; - -#endif // CHROME_TEST_BASE_TESTING_BROWSER_PROCESS_TEST_H_ diff --git a/chrome/test/pyautolib/pyautolib.cc b/chrome/test/pyautolib/pyautolib.cc index fcccbf5..d9fadfc 100644 --- a/chrome/test/pyautolib/pyautolib.cc +++ b/chrome/test/pyautolib/pyautolib.cc @@ -2,7 +2,9 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "base/base_paths.h" #include "base/memory/scoped_ptr.h" +#include "base/path_service.h" #include "base/string_number_conversions.h" #include "base/string_util.h" #include "base/utf_string_conversions.h" diff --git a/chrome/test/ui/ui_test_suite.cc b/chrome/test/ui/ui_test_suite.cc index 917b500..e0967c4 100644 --- a/chrome/test/ui/ui_test_suite.cc +++ b/chrome/test/ui/ui_test_suite.cc @@ -9,6 +9,7 @@ #include "base/command_line.h" #include "base/environment.h" #include "base/logging.h" +#include "base/memory/scoped_ptr.h" #include "base/path_service.h" #include "base/process_util.h" #include "chrome/common/chrome_switches.h" diff --git a/content/browser/DEPS b/content/browser/DEPS index 4794649..7fec844 100644 --- a/content/browser/DEPS +++ b/content/browser/DEPS @@ -6,5 +6,6 @@ include_rules = [ # for more information. # ONLY USED BY TESTS + "+chrome/browser/browser_process.h", "+chrome/browser/ui/browser.h", ] diff --git a/content/browser/debugger/devtools_manager_unittest.cc b/content/browser/debugger/devtools_manager_unittest.cc index 304bcd9..668054e 100644 --- a/content/browser/debugger/devtools_manager_unittest.cc +++ b/content/browser/debugger/devtools_manager_unittest.cc @@ -4,6 +4,8 @@ #include "base/basictypes.h" #include "base/time.h" +#include "chrome/browser/browser_process.h" +#include "chrome/test/base/testing_browser_process.h" #include "content/browser/debugger/devtools_client_host.h" #include "content/browser/debugger/devtools_manager.h" #include "content/browser/renderer_host/test_render_view_host.h" @@ -142,7 +144,8 @@ TEST_F(DevToolsManagerTest, NoUnresponsiveDialogInInspectedTab) { TestTabContentsDelegate delegate; contents()->set_delegate(&delegate); - testing_browser_process_.get()->SetDevToolsManager(new DevToolsManager()); + static_cast<TestingBrowserProcess*>(g_browser_process)-> + SetDevToolsManager(new DevToolsManager()); DevToolsManager* manager = DevToolsManager::GetInstance(); ASSERT_TRUE(manager); diff --git a/content/browser/in_process_webkit/dom_storage_unittest.cc b/content/browser/in_process_webkit/dom_storage_unittest.cc index 9c37adc..03cffe4 100644 --- a/content/browser/in_process_webkit/dom_storage_unittest.cc +++ b/content/browser/in_process_webkit/dom_storage_unittest.cc @@ -5,12 +5,12 @@ #include "base/file_path.h" #include "base/file_util.h" #include "chrome/test/base/testing_browser_process.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/test/base/testing_profile.h" #include "content/browser/in_process_webkit/webkit_context.h" +#include "testing/gtest/include/gtest/gtest.h" #include "webkit/quota/mock_special_storage_policy.h" -class DOMStorageTest : public TestingBrowserProcessTest { +class DOMStorageTest : public testing::Test { public: DOMStorageTest() : message_loop_(MessageLoop::TYPE_IO), diff --git a/content/browser/in_process_webkit/indexed_db_quota_client_unittest.cc b/content/browser/in_process_webkit/indexed_db_quota_client_unittest.cc index 19a544c..72fdc49 100644 --- a/content/browser/in_process_webkit/indexed_db_quota_client_unittest.cc +++ b/content/browser/in_process_webkit/indexed_db_quota_client_unittest.cc @@ -9,7 +9,6 @@ #include "base/memory/scoped_callback_factory.h" #include "base/message_loop.h" #include "base/message_loop_proxy.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/test/base/testing_profile.h" #include "content/browser/in_process_webkit/indexed_db_context.h" #include "content/browser/in_process_webkit/indexed_db_quota_client.h" @@ -24,7 +23,7 @@ static const quota::StorageType kPerm = quota::kStorageTypePersistent; using namespace webkit_database; // Base class for our test fixtures. -class IndexedDBQuotaClientTest : public TestingBrowserProcessTest { +class IndexedDBQuotaClientTest : public testing::Test { public: const GURL kOriginA; const GURL kOriginB; diff --git a/content/browser/in_process_webkit/webkit_context_unittest.cc b/content/browser/in_process_webkit/webkit_context_unittest.cc index 6ad6f6e..3e94a9d 100644 --- a/content/browser/in_process_webkit/webkit_context_unittest.cc +++ b/content/browser/in_process_webkit/webkit_context_unittest.cc @@ -30,7 +30,6 @@ class MockDOMStorageContext : public DOMStorageContext { }; TEST(WebKitContextTest, Basic) { - ScopedTestingBrowserProcess browser_process; TestingProfile profile; scoped_refptr<WebKitContext> context1(new WebKitContext( profile.IsOffTheRecord(), profile.GetPath(), @@ -48,8 +47,6 @@ TEST(WebKitContextTest, Basic) { } TEST(WebKitContextTest, PurgeMemory) { - ScopedTestingBrowserProcess browser_process; - // Start up a WebKit thread for the WebKitContext to call the // DOMStorageContext on. MessageLoop message_loop(MessageLoop::TYPE_DEFAULT); diff --git a/content/browser/plugin_service_unittest.cc b/content/browser/plugin_service_unittest.cc index 4e254db..4d9f420 100644 --- a/content/browser/plugin_service_unittest.cc +++ b/content/browser/plugin_service_unittest.cc @@ -4,13 +4,12 @@ #include "content/browser/plugin_service.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "content/browser/browser_thread.h" #include "testing/gtest/include/gtest/gtest.h" namespace { -class PluginServiceTest : public TestingBrowserProcessTest { +class PluginServiceTest : public testing::Test { public: PluginServiceTest() : message_loop_(MessageLoop::TYPE_IO), diff --git a/content/browser/renderer_host/render_widget_host_unittest.cc b/content/browser/renderer_host/render_widget_host_unittest.cc index 1cbb45e..b2e65346 100644 --- a/content/browser/renderer_host/render_widget_host_unittest.cc +++ b/content/browser/renderer_host/render_widget_host_unittest.cc @@ -245,7 +245,7 @@ class MockPaintingObserver : public NotificationObserver { // RenderWidgetHostTest -------------------------------------------------------- -class RenderWidgetHostTest : public TestingBrowserProcessTest { +class RenderWidgetHostTest : public testing::Test { public: RenderWidgetHostTest() : process_(NULL) { } diff --git a/content/browser/renderer_host/test_render_view_host.h b/content/browser/renderer_host/test_render_view_host.h index 9a79900..8761a93 100644 --- a/content/browser/renderer_host/test_render_view_host.h +++ b/content/browser/renderer_host/test_render_view_host.h @@ -15,7 +15,6 @@ #include "content/browser/renderer_host/render_view_host_factory.h" #include "content/browser/renderer_host/render_widget_host_view.h" #include "content/common/page_transition_types.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "testing/gtest/include/gtest/gtest.h" namespace gfx { @@ -283,7 +282,7 @@ class TestRenderViewHostFactory : public RenderViewHostFactory { // RenderViewHostTestHarness --------------------------------------------------- -class RenderViewHostTestHarness : public TestingBrowserProcessTest { +class RenderViewHostTestHarness : public testing::Test { public: RenderViewHostTestHarness(); virtual ~RenderViewHostTestHarness(); diff --git a/content/browser/site_instance_unittest.cc b/content/browser/site_instance_unittest.cc index 858b6a43..58bc415 100644 --- a/content/browser/site_instance_unittest.cc +++ b/content/browser/site_instance_unittest.cc @@ -5,7 +5,6 @@ #include "base/compiler_specific.h" #include "base/stl_util.h" #include "base/string16.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "chrome/test/base/testing_profile.h" #include "content/browser/browser_thread.h" #include "content/browser/browsing_instance.h" @@ -75,7 +74,7 @@ class SiteInstanceTestBrowserClient : public content::MockContentBrowserClient { content::ContentBrowserClient* old_browser_client_; }; -class SiteInstanceTest : public TestingBrowserProcessTest { +class SiteInstanceTest : public testing::Test { public: SiteInstanceTest() : ui_thread_(BrowserThread::UI, &message_loop_), diff --git a/content/browser/tab_contents/navigation_entry_unittest.cc b/content/browser/tab_contents/navigation_entry_unittest.cc index f67696f..ee7d083 100644 --- a/content/browser/tab_contents/navigation_entry_unittest.cc +++ b/content/browser/tab_contents/navigation_entry_unittest.cc @@ -5,12 +5,11 @@ #include "base/string16.h" #include "base/string_util.h" #include "base/utf_string_conversions.h" -#include "chrome/test/base/testing_browser_process_test.h" #include "content/browser/site_instance.h" #include "content/browser/tab_contents/navigation_entry.h" #include "testing/gtest/include/gtest/gtest.h" -class NavigationEntryTest : public TestingBrowserProcessTest { +class NavigationEntryTest : public testing::Test { public: NavigationEntryTest() : instance_(NULL) { } diff --git a/content/browser/tab_contents/tab_contents_delegate_unittest.cc b/content/browser/tab_contents/tab_contents_delegate_unittest.cc index b23929a..55a25b8 100644 --- a/content/browser/tab_contents/tab_contents_delegate_unittest.cc +++ b/content/browser/tab_contents/tab_contents_delegate_unittest.cc @@ -62,7 +62,6 @@ class MockTabContentsDelegate : public TabContentsDelegate { TEST(TabContentsDelegateTest, UnregisterInDestructor) { MessageLoop loop(MessageLoop::TYPE_UI); - ScopedTestingBrowserProcess browser_process; scoped_ptr<MockTabContentsDelegate> delegate(new MockTabContentsDelegate()); scoped_ptr<Profile> profile(new TestingProfile()); scoped_ptr<TabContents> contents_a( |