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

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

Issue 11275069: Perform install tasks for newly installed or upgraded component apps/extensions. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: rebase and move v2 component app added in r169911 (and r170087) into background section in componen… Created 8 years 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 4694 matching lines...) Expand 10 before | Expand all | Expand 10 after
4705 service_->Init(); 4705 service_->Init();
4706 4706
4707 // Note that we do not pump messages -- the extension should be loaded 4707 // Note that we do not pump messages -- the extension should be loaded
4708 // immediately. 4708 // immediately.
4709 4709
4710 EXPECT_EQ(0u, GetErrors().size()); 4710 EXPECT_EQ(0u, GetErrors().size());
4711 ASSERT_EQ(1u, loaded_.size()); 4711 ASSERT_EQ(1u, loaded_.size());
4712 EXPECT_EQ(Extension::COMPONENT, loaded_[0]->location()); 4712 EXPECT_EQ(Extension::COMPONENT, loaded_[0]->location());
4713 EXPECT_EQ(1u, service_->extensions()->size()); 4713 EXPECT_EQ(1u, service_->extensions()->size());
4714 4714
4715 // Component extensions shouldn't get recorded in the prefs. 4715 // Component extensions get a prefs entry on first install.
4716 ValidatePrefKeyCount(0); 4716 ValidatePrefKeyCount(1);
4717 4717
4718 // Reload all extensions, and make sure it comes back. 4718 // Reload all extensions, and make sure it comes back.
4719 std::string extension_id = (*service_->extensions()->begin())->id(); 4719 std::string extension_id = (*service_->extensions()->begin())->id();
4720 loaded_.clear(); 4720 loaded_.clear();
4721 service_->ReloadExtensions(); 4721 service_->ReloadExtensions();
4722 ASSERT_EQ(1u, service_->extensions()->size()); 4722 ASSERT_EQ(1u, service_->extensions()->size());
4723 EXPECT_EQ(extension_id, (*service_->extensions()->begin())->id()); 4723 EXPECT_EQ(extension_id, (*service_->extensions()->begin())->id());
4724 } 4724 }
4725 4725
4726 namespace { 4726 namespace {
(...skipping 1123 matching lines...) Expand 10 before | Expand all | Expand 10 after
5850 EXPECT_FALSE(extensions::HasExternalInstallError(service_)); 5850 EXPECT_FALSE(extensions::HasExternalInstallError(service_));
5851 EXPECT_FALSE(service_->IsExtensionEnabled(good_crx)); 5851 EXPECT_FALSE(service_->IsExtensionEnabled(good_crx));
5852 EXPECT_TRUE(service_->IsExtensionEnabled(page_action)); 5852 EXPECT_TRUE(service_->IsExtensionEnabled(page_action));
5853 5853
5854 ExtensionPrefs* prefs = service_->extension_prefs(); 5854 ExtensionPrefs* prefs = service_->extension_prefs();
5855 EXPECT_NE(0, prefs->GetDisableReasons(good_crx) & 5855 EXPECT_NE(0, prefs->GetDisableReasons(good_crx) &
5856 Extension::DISABLE_SIDELOAD_WIPEOUT); 5856 Extension::DISABLE_SIDELOAD_WIPEOUT);
5857 EXPECT_EQ(0, prefs->GetDisableReasons(page_action) & 5857 EXPECT_EQ(0, prefs->GetDisableReasons(page_action) &
5858 Extension::DISABLE_SIDELOAD_WIPEOUT); 5858 Extension::DISABLE_SIDELOAD_WIPEOUT);
5859 } 5859 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_service.cc ('k') | chrome/browser/extensions/extension_url_rewrite_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698