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

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

Issue 290723002: Fix Android build breakage with new extension tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 3024 matching lines...) Expand 10 before | Expand all | Expand 10 after
3035 &IsExtension, 3035 &IsExtension,
3036 kFakeInstallSilently, 3036 kFakeInstallSilently,
3037 kFakeRemoteInstall)); 3037 kFakeRemoteInstall));
3038 3038
3039 const extensions::PendingExtensionInfo* pending_extension_info; 3039 const extensions::PendingExtensionInfo* pending_extension_info;
3040 ASSERT_TRUE((pending_extension_info = service_->pending_extension_manager()-> 3040 ASSERT_TRUE((pending_extension_info = service_->pending_extension_manager()->
3041 GetById(kFakeId))); 3041 GetById(kFakeId)));
3042 EXPECT_EQ(kFakeUpdateURL, pending_extension_info->update_url()); 3042 EXPECT_EQ(kFakeUpdateURL, pending_extension_info->update_url());
3043 EXPECT_EQ(&IsExtension, pending_extension_info->should_allow_install_); 3043 EXPECT_EQ(&IsExtension, pending_extension_info->should_allow_install_);
3044 EXPECT_EQ(kFakeInstallSilently, pending_extension_info->install_silently()); 3044 EXPECT_EQ(kFakeInstallSilently, pending_extension_info->install_silently());
3045 EXPECT_EQ(kFakeRemoteInstall, pending_extension_info->remote_install()); 3045 // Use
3046 // EXPECT_TRUE(kFakeRemoteInstall == pending_extension_info->remote_install())
3047 // instead of
3048 // EXPECT_EQ(kFakeRemoteInstall, pending_extension_info->remote_install())
3049 // as gcc 4.7 issues the following warning on EXPECT_EQ(false, x), which is
3050 // turned into an error with -Werror=conversion-null:
3051 // converting 'false' to pointer type for argument 1 of
3052 // 'char testing::internal::IsNullLiteralHelper(testing::internal::Secret*)'
3053 // https://code.google.com/p/googletest/issues/detail?id=458
3054 EXPECT_TRUE(kFakeRemoteInstall == pending_extension_info->remote_install());
3046 } 3055 }
3047 3056
3048 namespace { 3057 namespace {
3049 const char kGoodId[] = "ldnnhddmnhbkjipkidpdiheffobcpfmf"; 3058 const char kGoodId[] = "ldnnhddmnhbkjipkidpdiheffobcpfmf";
3050 const char kGoodUpdateURL[] = "http://good.update/url"; 3059 const char kGoodUpdateURL[] = "http://good.update/url";
3051 const bool kGoodIsFromSync = true; 3060 const bool kGoodIsFromSync = true;
3052 const bool kGoodInstallSilently = true; 3061 const bool kGoodInstallSilently = true;
3053 const bool kGoodRemoteInstall = false; 3062 const bool kGoodRemoteInstall = false;
3054 } // namespace 3063 } // namespace
3055 3064
(...skipping 3911 matching lines...) Expand 10 before | Expand all | Expand 10 after
6967 6976
6968 service_->Observe(chrome::NOTIFICATION_PROFILE_DESTRUCTION_STARTED, 6977 service_->Observe(chrome::NOTIFICATION_PROFILE_DESTRUCTION_STARTED,
6969 content::Source<Profile>(profile_.get()), 6978 content::Source<Profile>(profile_.get()),
6970 content::NotificationService::NoDetails()); 6979 content::NotificationService::NoDetails());
6971 EXPECT_EQ(UnloadedExtensionInfo::REASON_PROFILE_SHUTDOWN, unloaded_reason_); 6980 EXPECT_EQ(UnloadedExtensionInfo::REASON_PROFILE_SHUTDOWN, unloaded_reason_);
6972 EXPECT_EQ(0u, registry_->enabled_extensions().size()); 6981 EXPECT_EQ(0u, registry_->enabled_extensions().size());
6973 EXPECT_EQ(0u, registry_->disabled_extensions().size()); 6982 EXPECT_EQ(0u, registry_->disabled_extensions().size());
6974 EXPECT_EQ(0u, registry_->terminated_extensions().size()); 6983 EXPECT_EQ(0u, registry_->terminated_extensions().size());
6975 EXPECT_EQ(0u, registry_->blacklisted_extensions().size()); 6984 EXPECT_EQ(0u, registry_->blacklisted_extensions().size());
6976 } 6985 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698