| OLD | NEW |
| 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 <set> | 5 #include <set> |
| 6 #include <string> | 6 #include <string> |
| 7 | 7 |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "base/values.h" | 10 #include "base/values.h" |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 base::DictionaryValue forced_extensions; | 132 base::DictionaryValue forced_extensions; |
| 133 std::set<std::string> expected_extensions; | 133 std::set<std::string> expected_extensions; |
| 134 | 134 |
| 135 extensions::ExternalPolicyLoader::AddExtension( | 135 extensions::ExternalPolicyLoader::AddExtension( |
| 136 &forced_extensions, "cccccccccccccccccccccccccccccccc", | 136 &forced_extensions, "cccccccccccccccccccccccccccccccc", |
| 137 "http://www.example.com/crx"); | 137 "http://www.example.com/crx"); |
| 138 expected_extensions.insert("cccccccccccccccccccccccccccccccc"); | 138 expected_extensions.insert("cccccccccccccccccccccccccccccccc"); |
| 139 | 139 |
| 140 // Add invalid entries. | 140 // Add invalid entries. |
| 141 forced_extensions.SetString("invalid", "http://www.example.com/crx"); | 141 forced_extensions.SetString("invalid", "http://www.example.com/crx"); |
| 142 forced_extensions.SetString("dddddddddddddddddddddddddddddddd", ""); | 142 forced_extensions.SetString("dddddddddddddddddddddddddddddddd", |
| 143 std::string()); |
| 143 forced_extensions.SetString("invalid", "bad"); | 144 forced_extensions.SetString("invalid", "bad"); |
| 144 | 145 |
| 145 MockExternalPolicyProviderVisitor mv; | 146 MockExternalPolicyProviderVisitor mv; |
| 146 mv.Visit(forced_extensions, expected_extensions); | 147 mv.Visit(forced_extensions, expected_extensions); |
| 147 } | 148 } |
| 148 | 149 |
| 149 } // namespace extensions | 150 } // namespace extensions |
| OLD | NEW |