OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |