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

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

Issue 7465041: GTTF: Use a fresh TestingBrowserProcess for each test, part #4 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/extensions/extension_service_unittest.h" 5 #include "chrome/browser/extensions/extension_service_unittest.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 3236 matching lines...) Expand 10 before | Expand all | Expand 10 after
3247 bool ready_; 3247 bool ready_;
3248 }; 3248 };
3249 3249
3250 // Test that we get enabled/disabled correctly for all the pref/command-line 3250 // Test that we get enabled/disabled correctly for all the pref/command-line
3251 // combinations. We don't want to derive from the ExtensionServiceTest class 3251 // combinations. We don't want to derive from the ExtensionServiceTest class
3252 // for this test, so we use ExtensionServiceTestSimple. 3252 // for this test, so we use ExtensionServiceTestSimple.
3253 // 3253 //
3254 // Also tests that we always fire EXTENSIONS_READY, no matter whether we are 3254 // Also tests that we always fire EXTENSIONS_READY, no matter whether we are
3255 // enabled or not. 3255 // enabled or not.
3256 TEST(ExtensionServiceTestSimple, Enabledness) { 3256 TEST(ExtensionServiceTestSimple, Enabledness) {
3257 ScopedTestingBrowserProcess browser_process;
3258
3257 ExtensionErrorReporter::Init(false); // no noisy errors 3259 ExtensionErrorReporter::Init(false); // no noisy errors
3258 ExtensionsReadyRecorder recorder; 3260 ExtensionsReadyRecorder recorder;
3259 scoped_ptr<TestingProfile> profile(new TestingProfile()); 3261 scoped_ptr<TestingProfile> profile(new TestingProfile());
3260 MessageLoop loop; 3262 MessageLoop loop;
3261 BrowserThread ui_thread(BrowserThread::UI, &loop); 3263 BrowserThread ui_thread(BrowserThread::UI, &loop);
3262 BrowserThread file_thread(BrowserThread::FILE, &loop); 3264 BrowserThread file_thread(BrowserThread::FILE, &loop);
3263 scoped_ptr<CommandLine> command_line; 3265 scoped_ptr<CommandLine> command_line;
3264 FilePath install_dir = profile->GetPath() 3266 FilePath install_dir = profile->GetPath()
3265 .AppendASCII(ExtensionService::kInstallDirectoryName); 3267 .AppendASCII(ExtensionService::kInstallDirectoryName);
3266 3268
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after
3794 ASSERT_FALSE(AddPendingSyncInstall()); 3796 ASSERT_FALSE(AddPendingSyncInstall());
3795 3797
3796 // Wait for the external source to install. 3798 // Wait for the external source to install.
3797 WaitForCrxInstall(crx_path_, true); 3799 WaitForCrxInstall(crx_path_, true);
3798 ASSERT_TRUE(IsCrxInstalled()); 3800 ASSERT_TRUE(IsCrxInstalled());
3799 3801
3800 // Now that the extension is installed, sync request should fail 3802 // Now that the extension is installed, sync request should fail
3801 // because the extension is already installed. 3803 // because the extension is already installed.
3802 ASSERT_FALSE(AddPendingSyncInstall()); 3804 ASSERT_FALSE(AddPendingSyncInstall());
3803 } 3805 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_service_unittest.h ('k') | chrome/browser/extensions/extension_updater_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698