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

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

Powered by Google App Engine
This is Rietveld 408576698