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

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

Issue 10918174: Remove PluginGroup (Closed) Base URL: http://git.chromium.org/chromium/src.git@remove_async_plugin_finder
Patch Set: Created 8 years, 3 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
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 #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 4235 matching lines...) Expand 10 before | Expand all | Expand 10 after
4246 TEST(ExtensionServiceTestSimple, Enabledness) { 4246 TEST(ExtensionServiceTestSimple, Enabledness) {
4247 ExtensionErrorReporter::Init(false); // no noisy errors 4247 ExtensionErrorReporter::Init(false); // no noisy errors
4248 ExtensionsReadyRecorder recorder; 4248 ExtensionsReadyRecorder recorder;
4249 scoped_ptr<TestingProfile> profile(new TestingProfile()); 4249 scoped_ptr<TestingProfile> profile(new TestingProfile());
4250 MessageLoop loop; 4250 MessageLoop loop;
4251 content::TestBrowserThread ui_thread(BrowserThread::UI, &loop); 4251 content::TestBrowserThread ui_thread(BrowserThread::UI, &loop);
4252 content::TestBrowserThread file_thread(BrowserThread::FILE, &loop); 4252 content::TestBrowserThread file_thread(BrowserThread::FILE, &loop);
4253 scoped_ptr<CommandLine> command_line; 4253 scoped_ptr<CommandLine> command_line;
4254 FilePath install_dir = profile->GetPath() 4254 FilePath install_dir = profile->GetPath()
4255 .AppendASCII(ExtensionService::kInstallDirectoryName); 4255 .AppendASCII(ExtensionService::kInstallDirectoryName);
4256 webkit::npapi::MockPluginList plugin_list(NULL, 0); 4256 webkit::npapi::MockPluginList plugin_list;
4257 PluginService::GetInstance()->SetPluginListForTesting(&plugin_list); 4257 PluginService::GetInstance()->SetPluginListForTesting(&plugin_list);
4258 4258
4259 // By default, we are enabled. 4259 // By default, we are enabled.
4260 command_line.reset(new CommandLine(CommandLine::NO_PROGRAM)); 4260 command_line.reset(new CommandLine(CommandLine::NO_PROGRAM));
4261 ExtensionService* service = static_cast<extensions::TestExtensionSystem*>( 4261 ExtensionService* service = static_cast<extensions::TestExtensionSystem*>(
4262 ExtensionSystem::Get(profile.get()))-> 4262 ExtensionSystem::Get(profile.get()))->
4263 CreateExtensionService( 4263 CreateExtensionService(
4264 command_line.get(), 4264 command_line.get(),
4265 install_dir, 4265 install_dir,
4266 false); 4266 false);
(...skipping 1151 matching lines...) Expand 10 before | Expand all | Expand 10 after
5418 // This should NOT trigger an alert. 5418 // This should NOT trigger an alert.
5419 provider->UpdateOrAddExtension(hosted_app, "1.0.0.0", 5419 provider->UpdateOrAddExtension(hosted_app, "1.0.0.0",
5420 data_dir_.AppendASCII("hosted_app.crx")); 5420 data_dir_.AppendASCII("hosted_app.crx"));
5421 5421
5422 service_->CheckForExternalUpdates(); 5422 service_->CheckForExternalUpdates();
5423 loop_.RunAllPending(); 5423 loop_.RunAllPending();
5424 5424
5425 ASSERT_TRUE(service_->PopulateExtensionErrorUI(extension_error_ui.get())); 5425 ASSERT_TRUE(service_->PopulateExtensionErrorUI(extension_error_ui.get()));
5426 ASSERT_EQ(1u, extension_error_ui->get_external_extension_ids()->size()); 5426 ASSERT_EQ(1u, extension_error_ui->get_external_extension_ids()->size());
5427 } 5427 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698