| 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" |
| 11 #include "chrome/browser/extensions/external_extension_provider_interface.h" | 11 #include "chrome/browser/extensions/external_extension_provider_interface.h" |
| 12 #include "chrome/browser/extensions/external_extension_provider_impl.h" | 12 #include "chrome/browser/extensions/external_extension_provider_impl.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_browser_process_test.h" |
| 16 #include "chrome/test/base/testing_pref_service.h" | 17 #include "chrome/test/base/testing_pref_service.h" |
| 17 #include "chrome/test/base/testing_profile.h" | 18 #include "chrome/test/base/testing_profile.h" |
| 18 #include "chrome/test/testing_browser_process_test.h" | |
| 19 #include "content/browser/browser_thread.h" | 19 #include "content/browser/browser_thread.h" |
| 20 #include "testing/gtest/include/gtest/gtest.h" | 20 #include "testing/gtest/include/gtest/gtest.h" |
| 21 | 21 |
| 22 class ExternalPolicyExtensionProviderTest : public TestingBrowserProcessTest { | 22 class ExternalPolicyExtensionProviderTest : public TestingBrowserProcessTest { |
| 23 public: | 23 public: |
| 24 ExternalPolicyExtensionProviderTest() | 24 ExternalPolicyExtensionProviderTest() |
| 25 : loop_(MessageLoop::TYPE_IO), | 25 : loop_(MessageLoop::TYPE_IO), |
| 26 ui_thread_(BrowserThread::UI, &loop_) { | 26 ui_thread_(BrowserThread::UI, &loop_) { |
| 27 } | 27 } |
| 28 | 28 |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;http#//www.example.com/crx")); | 137 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;http#//www.example.com/crx")); |
| 138 forced_extensions.Append(Value::CreateStringValue( | 138 forced_extensions.Append(Value::CreateStringValue( |
| 139 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")); | 139 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")); |
| 140 forced_extensions.Append(Value::CreateStringValue( | 140 forced_extensions.Append(Value::CreateStringValue( |
| 141 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaahttp#//www.example.com/crx")); | 141 "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaahttp#//www.example.com/crx")); |
| 142 | 142 |
| 143 MockExternalPolicyExtensionProviderVisitor mv; | 143 MockExternalPolicyExtensionProviderVisitor mv; |
| 144 std::set<std::string> empty; | 144 std::set<std::string> empty; |
| 145 mv.Visit(&forced_extensions, &valid_extensions, empty); | 145 mv.Visit(&forced_extensions, &valid_extensions, empty); |
| 146 } | 146 } |
| OLD | NEW |