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

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: fix conflicts Created 8 years, 2 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 4352 matching lines...) Expand 10 before | Expand all | Expand 10 after
4363 TEST(ExtensionServiceTestSimple, Enabledness) { 4363 TEST(ExtensionServiceTestSimple, Enabledness) {
4364 ExtensionErrorReporter::Init(false); // no noisy errors 4364 ExtensionErrorReporter::Init(false); // no noisy errors
4365 ExtensionsReadyRecorder recorder; 4365 ExtensionsReadyRecorder recorder;
4366 scoped_ptr<TestingProfile> profile(new TestingProfile()); 4366 scoped_ptr<TestingProfile> profile(new TestingProfile());
4367 MessageLoop loop; 4367 MessageLoop loop;
4368 content::TestBrowserThread ui_thread(BrowserThread::UI, &loop); 4368 content::TestBrowserThread ui_thread(BrowserThread::UI, &loop);
4369 content::TestBrowserThread file_thread(BrowserThread::FILE, &loop); 4369 content::TestBrowserThread file_thread(BrowserThread::FILE, &loop);
4370 scoped_ptr<CommandLine> command_line; 4370 scoped_ptr<CommandLine> command_line;
4371 FilePath install_dir = profile->GetPath() 4371 FilePath install_dir = profile->GetPath()
4372 .AppendASCII(ExtensionService::kInstallDirectoryName); 4372 .AppendASCII(ExtensionService::kInstallDirectoryName);
4373 webkit::npapi::MockPluginList plugin_list(NULL, 0); 4373 webkit::npapi::MockPluginList plugin_list;
4374 PluginService::GetInstance()->SetPluginListForTesting(&plugin_list); 4374 PluginService::GetInstance()->SetPluginListForTesting(&plugin_list);
4375 4375
4376 // By default, we are enabled. 4376 // By default, we are enabled.
4377 command_line.reset(new CommandLine(CommandLine::NO_PROGRAM)); 4377 command_line.reset(new CommandLine(CommandLine::NO_PROGRAM));
4378 ExtensionService* service = static_cast<extensions::TestExtensionSystem*>( 4378 ExtensionService* service = static_cast<extensions::TestExtensionSystem*>(
4379 ExtensionSystem::Get(profile.get()))-> 4379 ExtensionSystem::Get(profile.get()))->
4380 CreateExtensionService( 4380 CreateExtensionService(
4381 command_line.get(), 4381 command_line.get(),
4382 install_dir, 4382 install_dir,
4383 false); 4383 false);
(...skipping 1151 matching lines...) Expand 10 before | Expand all | Expand 10 after
5535 // This should NOT trigger an alert. 5535 // This should NOT trigger an alert.
5536 provider->UpdateOrAddExtension(hosted_app, "1.0.0.0", 5536 provider->UpdateOrAddExtension(hosted_app, "1.0.0.0",
5537 data_dir_.AppendASCII("hosted_app.crx")); 5537 data_dir_.AppendASCII("hosted_app.crx"));
5538 5538
5539 service_->CheckForExternalUpdates(); 5539 service_->CheckForExternalUpdates();
5540 loop_.RunAllPending(); 5540 loop_.RunAllPending();
5541 5541
5542 ASSERT_TRUE(service_->PopulateExtensionErrorUI(extension_error_ui.get())); 5542 ASSERT_TRUE(service_->PopulateExtensionErrorUI(extension_error_ui.get()));
5543 ASSERT_EQ(1u, extension_error_ui->get_external_extension_ids()->size()); 5543 ASSERT_EQ(1u, extension_error_ui->get_external_extension_ids()->size());
5544 } 5544 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698