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 <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" |
11 #include "chrome/browser/extensions/external_extension_provider_impl.h" | 11 #include "chrome/browser/extensions/external_extension_provider_impl.h" |
12 #include "chrome/browser/extensions/external_extension_provider_interface.h" | 12 #include "chrome/browser/extensions/external_extension_provider_interface.h" |
13 #include "chrome/browser/extensions/external_policy_extension_loader.h" | 13 #include "chrome/browser/extensions/external_policy_extension_loader.h" |
14 #include "chrome/common/extensions/extension.h" | 14 #include "chrome/common/extensions/extension.h" |
15 #include "chrome/common/pref_names.h" | 15 #include "chrome/common/pref_names.h" |
16 #include "chrome/test/base/testing_pref_service.h" | 16 #include "chrome/test/base/testing_pref_service.h" |
17 #include "chrome/test/base/testing_profile.h" | 17 #include "chrome/test/base/testing_profile.h" |
18 #include "content/test/test_browser_thread.h" | 18 #include "content/public/test/test_browser_thread.h" |
19 #include "testing/gtest/include/gtest/gtest.h" | 19 #include "testing/gtest/include/gtest/gtest.h" |
20 | 20 |
21 using content::BrowserThread; | 21 using content::BrowserThread; |
22 using extensions::Extension; | 22 using extensions::Extension; |
23 | 23 |
24 class ExternalPolicyExtensionProviderTest : public testing::Test { | 24 class ExternalPolicyExtensionProviderTest : public testing::Test { |
25 public: | 25 public: |
26 ExternalPolicyExtensionProviderTest() | 26 ExternalPolicyExtensionProviderTest() |
27 : loop_(MessageLoop::TYPE_IO), | 27 : loop_(MessageLoop::TYPE_IO), |
28 ui_thread_(BrowserThread::UI, &loop_) { | 28 ui_thread_(BrowserThread::UI, &loop_) { |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;http#//www.example.com/crx")); | 146 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;http#//www.example.com/crx")); |
147 forced_extensions.Append(Value::CreateStringValue( | 147 forced_extensions.Append(Value::CreateStringValue( |
148 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")); | 148 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")); |
149 forced_extensions.Append(Value::CreateStringValue( | 149 forced_extensions.Append(Value::CreateStringValue( |
150 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaahttp#//www.example.com/crx")); | 150 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaahttp#//www.example.com/crx")); |
151 | 151 |
152 MockExternalPolicyExtensionProviderVisitor mv; | 152 MockExternalPolicyExtensionProviderVisitor mv; |
153 std::set<std::string> empty; | 153 std::set<std::string> empty; |
154 mv.Visit(&forced_extensions, &valid_extensions, empty); | 154 mv.Visit(&forced_extensions, &valid_extensions, empty); |
155 } | 155 } |
OLD | NEW |