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

Side by Side Diff: chrome/browser/extensions/extension_service_unittest.h

Issue 128993004: Fix subtle bug with the in-process utility thread usage in unit tests. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 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 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_UNITTEST_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_UNITTEST_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_UNITTEST_H_ 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_UNITTEST_H_
7 7
8 #include "base/at_exit.h" 8 #include "base/at_exit.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/files/scoped_temp_dir.h" 10 #include "base/files/scoped_temp_dir.h"
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "base/message_loop/message_loop.h" 13 #include "base/message_loop/message_loop.h"
14 #include "chrome/browser/extensions/extension_service.h" 14 #include "chrome/browser/extensions/extension_service.h"
15 #include "content/public/test/test_browser_thread_bundle.h" 15 #include "content/public/test/test_browser_thread_bundle.h"
16 #include "content/public/test/test_utils.h"
16 #include "extensions/common/feature_switch.h" 17 #include "extensions/common/feature_switch.h"
17 #include "testing/gtest/include/gtest/gtest.h" 18 #include "testing/gtest/include/gtest/gtest.h"
18 19
19 #if defined(OS_CHROMEOS) 20 #if defined(OS_CHROMEOS)
20 #include "chrome/browser/chromeos/login/user_manager.h" 21 #include "chrome/browser/chromeos/login/user_manager.h"
21 #include "chrome/browser/chromeos/settings/cros_settings.h" 22 #include "chrome/browser/chromeos/settings/cros_settings.h"
22 #include "chrome/browser/chromeos/settings/device_settings_service.h" 23 #include "chrome/browser/chromeos/settings/device_settings_service.h"
23 #endif 24 #endif
24 25
25 class TestingProfile; 26 class TestingProfile;
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 content::TestBrowserThreadBundle thread_bundle_; 88 content::TestBrowserThreadBundle thread_bundle_;
88 base::ScopedTempDir temp_dir_; 89 base::ScopedTempDir temp_dir_;
89 scoped_ptr<TestingProfile> profile_; 90 scoped_ptr<TestingProfile> profile_;
90 base::FilePath extensions_install_dir_; 91 base::FilePath extensions_install_dir_;
91 base::FilePath data_dir_; 92 base::FilePath data_dir_;
92 // Managed by extensions::ExtensionSystemFactory. 93 // Managed by extensions::ExtensionSystemFactory.
93 ExtensionService* service_; 94 ExtensionService* service_;
94 extensions::ManagementPolicy* management_policy_; 95 extensions::ManagementPolicy* management_policy_;
95 scoped_ptr<ExtensionSyncService> extension_sync_service_; 96 scoped_ptr<ExtensionSyncService> extension_sync_service_;
96 size_t expected_extensions_count_; 97 size_t expected_extensions_count_;
98 content::InProcessUtilityThreadHelper in_process_utility_thread_helper_;
97 99
98 #if defined OS_CHROMEOS 100 #if defined OS_CHROMEOS
99 chromeos::ScopedTestDeviceSettingsService test_device_settings_service_; 101 chromeos::ScopedTestDeviceSettingsService test_device_settings_service_;
100 chromeos::ScopedTestCrosSettings test_cros_settings_; 102 chromeos::ScopedTestCrosSettings test_cros_settings_;
101 chromeos::ScopedTestUserManager test_user_manager_; 103 chromeos::ScopedTestUserManager test_user_manager_;
102 #endif 104 #endif
103 }; 105 };
104 106
105 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_UNITTEST_H_ 107 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_UNITTEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698