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

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

Issue 8800016: Exempt default apps from external-extension alerts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Suggestions from Roger. Created 9 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/extensions/external_extension_provider_interface.h ('k') | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 <string> 5 #include <string>
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "base/version.h" 10 #include "base/version.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 // so it should be emptied by the end. 62 // so it should be emptied by the end.
63 remaining_extensions = policy_validlist; 63 remaining_extensions = policy_validlist;
64 provider_->VisitRegisteredExtension(); 64 provider_->VisitRegisteredExtension();
65 EXPECT_EQ(0u, remaining_extensions->GetSize()); 65 EXPECT_EQ(0u, remaining_extensions->GetSize());
66 } 66 }
67 67
68 virtual void OnExternalExtensionFileFound(const std::string& id, 68 virtual void OnExternalExtensionFileFound(const std::string& id,
69 const Version* version, 69 const Version* version,
70 const FilePath& path, 70 const FilePath& path,
71 Extension::Location unused, 71 Extension::Location unused,
72 int unused2) { 72 int unused2,
73 bool unused3) {
73 ADD_FAILURE() << "There should be no external extensions from files."; 74 ADD_FAILURE() << "There should be no external extensions from files.";
74 } 75 }
75 76
76 virtual void OnExternalExtensionUpdateUrlFound( 77 virtual void OnExternalExtensionUpdateUrlFound(
77 const std::string& id, const GURL& update_url, 78 const std::string& id, const GURL& update_url,
78 Extension::Location location) { 79 Extension::Location location) {
79 // Extension has the correct location. 80 // Extension has the correct location.
80 EXPECT_EQ(Extension::EXTERNAL_POLICY_DOWNLOAD, location); 81 EXPECT_EQ(Extension::EXTERNAL_POLICY_DOWNLOAD, location);
81 82
82 // Provider returns the correct location when asked. 83 // Provider returns the correct location when asked.
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;http#//www.example.com/crx")); 143 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;http#//www.example.com/crx"));
143 forced_extensions.Append(Value::CreateStringValue( 144 forced_extensions.Append(Value::CreateStringValue(
144 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")); 145 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"));
145 forced_extensions.Append(Value::CreateStringValue( 146 forced_extensions.Append(Value::CreateStringValue(
146 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaahttp#//www.example.com/crx")); 147 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaahttp#//www.example.com/crx"));
147 148
148 MockExternalPolicyExtensionProviderVisitor mv; 149 MockExternalPolicyExtensionProviderVisitor mv;
149 std::set<std::string> empty; 150 std::set<std::string> empty;
150 mv.Visit(&forced_extensions, &valid_extensions, empty); 151 mv.Visit(&forced_extensions, &valid_extensions, empty);
151 } 152 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/external_extension_provider_interface.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698