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

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

Issue 19462009: [DRAFT] Allow a user to revert to their previous theme without closing infobar (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 817 matching lines...) Expand 10 before | Expand all | Expand 10 after
828 << path.value(); 828 << path.value();
829 // If INSTALL_UPDATED, old_name_ should match the given string. 829 // If INSTALL_UPDATED, old_name_ should match the given string.
830 if (install_state == INSTALL_UPDATED && !expected_old_name.empty()) 830 if (install_state == INSTALL_UPDATED && !expected_old_name.empty())
831 EXPECT_EQ(expected_old_name, old_name_); 831 EXPECT_EQ(expected_old_name, old_name_);
832 EXPECT_EQ(0u, errors.size()) << path.value(); 832 EXPECT_EQ(0u, errors.size()) << path.value();
833 833
834 if (install_state == INSTALL_WITHOUT_LOAD) { 834 if (install_state == INSTALL_WITHOUT_LOAD) {
835 EXPECT_EQ(0u, loaded_.size()) << path.value(); 835 EXPECT_EQ(0u, loaded_.size()) << path.value();
836 } else { 836 } else {
837 EXPECT_EQ(1u, loaded_.size()) << path.value(); 837 EXPECT_EQ(1u, loaded_.size()) << path.value();
838 EXPECT_EQ(expected_extensions_count_, service_->extensions()->size()) << 838 size_t actual_extension_count = service_->extensions()->size() +
839 service_->disabled_extensions()->size();
840 EXPECT_EQ(expected_extensions_count_, actual_extension_count) <<
839 path.value(); 841 path.value();
840 extension = loaded_[0].get(); 842 extension = loaded_[0].get();
841 EXPECT_TRUE(service_->GetExtensionById(extension->id(), false)) 843 EXPECT_TRUE(service_->GetExtensionById(extension->id(), false))
842 << path.value(); 844 << path.value();
843 } 845 }
844 846
845 for (std::vector<string16>::iterator err = errors.begin(); 847 for (std::vector<string16>::iterator err = errors.begin();
846 err != errors.end(); ++err) { 848 err != errors.end(); ++err) {
847 LOG(ERROR) << *err; 849 LOG(ERROR) << *err;
848 } 850 }
(...skipping 5492 matching lines...) Expand 10 before | Expand all | Expand 10 after
6341 provider->UpdateOrAddExtension(updates_from_webstore, "1", crx_path); 6343 provider->UpdateOrAddExtension(updates_from_webstore, "1", crx_path);
6342 6344
6343 service_->CheckForExternalUpdates(); 6345 service_->CheckForExternalUpdates();
6344 content::WindowedNotificationObserver( 6346 content::WindowedNotificationObserver(
6345 chrome::NOTIFICATION_CRX_INSTALLER_DONE, 6347 chrome::NOTIFICATION_CRX_INSTALLER_DONE,
6346 content::NotificationService::AllSources()).Wait(); 6348 content::NotificationService::AllSources()).Wait();
6347 EXPECT_TRUE(extensions::HasExternalInstallError(service_)); 6349 EXPECT_TRUE(extensions::HasExternalInstallError(service_));
6348 EXPECT_FALSE(extensions::HasExternalInstallBubble(service_)); 6350 EXPECT_FALSE(extensions::HasExternalInstallBubble(service_));
6349 EXPECT_FALSE(service_->IsExtensionEnabled(updates_from_webstore)); 6351 EXPECT_FALSE(service_->IsExtensionEnabled(updates_from_webstore));
6350 } 6352 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698