OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <string> | 5 #include <string> |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/files/scoped_temp_dir.h" | 9 #include "base/files/scoped_temp_dir.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
11 #include "base/path_service.h" | 11 #include "base/path_service.h" |
12 #include "base/utf_string_conversions.h" | 12 #include "base/utf_string_conversions.h" |
13 #include "base/values.h" | 13 #include "base/values.h" |
14 #include "build/build_config.h" | 14 #include "build/build_config.h" |
15 #include "chrome/browser/bookmarks/bookmark_model_factory.h" | 15 #include "chrome/browser/bookmarks/bookmark_model_factory.h" |
16 #include "chrome/browser/browser_process.h" | 16 #include "chrome/browser/browser_process.h" |
| 17 #include "chrome/browser/chromeos/settings/cros_settings.h" |
17 #include "chrome/browser/extensions/event_router_forwarder.h" | 18 #include "chrome/browser/extensions/event_router_forwarder.h" |
18 #include "chrome/browser/history/history_service.h" | 19 #include "chrome/browser/history/history_service.h" |
19 #include "chrome/browser/history/history_service_factory.h" | 20 #include "chrome/browser/history/history_service_factory.h" |
20 #include "chrome/browser/io_thread.h" | 21 #include "chrome/browser/io_thread.h" |
21 #include "chrome/browser/prefs/browser_prefs.h" | 22 #include "chrome/browser/prefs/browser_prefs.h" |
22 #include "chrome/browser/profiles/profile.h" | 23 #include "chrome/browser/profiles/profile.h" |
23 #include "chrome/browser/profiles/profile_info_cache.h" | 24 #include "chrome/browser/profiles/profile_info_cache.h" |
24 #include "chrome/browser/profiles/profile_manager.h" | 25 #include "chrome/browser/profiles/profile_manager.h" |
25 #include "chrome/browser/ui/browser.h" | 26 #include "chrome/browser/ui/browser.h" |
26 #include "chrome/common/chrome_constants.h" | 27 #include "chrome/common/chrome_constants.h" |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 virtual void TearDown() { | 118 virtual void TearDown() { |
118 TestingBrowserProcess::GetGlobal()->SetProfileManager(NULL); | 119 TestingBrowserProcess::GetGlobal()->SetProfileManager(NULL); |
119 message_loop_.RunUntilIdle(); | 120 message_loop_.RunUntilIdle(); |
120 } | 121 } |
121 | 122 |
122 #if defined(OS_CHROMEOS) | 123 #if defined(OS_CHROMEOS) |
123 // Do not change order of stub_cros_enabler_, which needs to be constructed | 124 // Do not change order of stub_cros_enabler_, which needs to be constructed |
124 // before io_thread_ which requires CrosLibrary to be initialized to construct | 125 // before io_thread_ which requires CrosLibrary to be initialized to construct |
125 // its data member pref_proxy_config_tracker_ on ChromeOS. | 126 // its data member pref_proxy_config_tracker_ on ChromeOS. |
126 chromeos::ScopedStubCrosEnabler stub_cros_enabler_; | 127 chromeos::ScopedStubCrosEnabler stub_cros_enabler_; |
| 128 chromeos::ScopedTestCrosSettings test_cros_settings_; |
127 #endif | 129 #endif |
128 | 130 |
129 // The path to temporary directory used to contain the test operations. | 131 // The path to temporary directory used to contain the test operations. |
130 base::ScopedTempDir temp_dir_; | 132 base::ScopedTempDir temp_dir_; |
131 ScopedTestingLocalState local_state_; | 133 ScopedTestingLocalState local_state_; |
132 scoped_refptr<extensions::EventRouterForwarder> | 134 scoped_refptr<extensions::EventRouterForwarder> |
133 extension_event_router_forwarder_; | 135 extension_event_router_forwarder_; |
134 | 136 |
135 MessageLoopForUI message_loop_; | 137 MessageLoopForUI message_loop_; |
136 content::TestBrowserThread ui_thread_; | 138 content::TestBrowserThread ui_thread_; |
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
601 browser2b.reset(); | 603 browser2b.reset(); |
602 last_opened_profiles = profile_manager->GetLastOpenedProfiles(); | 604 last_opened_profiles = profile_manager->GetLastOpenedProfiles(); |
603 ASSERT_EQ(1U, last_opened_profiles.size()); | 605 ASSERT_EQ(1U, last_opened_profiles.size()); |
604 EXPECT_EQ(profile1, last_opened_profiles[0]); | 606 EXPECT_EQ(profile1, last_opened_profiles[0]); |
605 | 607 |
606 browser1.reset(); | 608 browser1.reset(); |
607 last_opened_profiles = profile_manager->GetLastOpenedProfiles(); | 609 last_opened_profiles = profile_manager->GetLastOpenedProfiles(); |
608 ASSERT_EQ(0U, last_opened_profiles.size()); | 610 ASSERT_EQ(0U, last_opened_profiles.size()); |
609 } | 611 } |
610 #endif // !defined(OS_ANDROID) | 612 #endif // !defined(OS_ANDROID) |
OLD | NEW |