| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "chrome/browser/autocomplete/keyword_extensions_delegate_impl.h" | 5 #include "chrome/browser/autocomplete/keyword_extensions_delegate_impl.h" |
| 6 | 6 |
| 7 #include "base/memory/ref_counted.h" | 7 #include "base/memory/ref_counted.h" |
| 8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
| 9 #include "chrome/browser/extensions/extension_service.h" | 9 #include "chrome/browser/extensions/extension_service.h" |
| 10 #include "chrome/browser/extensions/extension_service_test_base.h" | 10 #include "chrome/browser/extensions/extension_service_test_base.h" |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 | 69 |
| 70 void RunTest(bool incognito); | 70 void RunTest(bool incognito); |
| 71 | 71 |
| 72 private: | 72 private: |
| 73 DISALLOW_COPY_AND_ASSIGN(KeywordExtensionsDelegateImplTest); | 73 DISALLOW_COPY_AND_ASSIGN(KeywordExtensionsDelegateImplTest); |
| 74 }; | 74 }; |
| 75 | 75 |
| 76 void KeywordExtensionsDelegateImplTest::SetUp() { | 76 void KeywordExtensionsDelegateImplTest::SetUp() { |
| 77 ExtensionServiceTestBase::SetUp(); | 77 ExtensionServiceTestBase::SetUp(); |
| 78 InitializeExtensionService(CreateDefaultInitParams()); | 78 InitializeExtensionService(CreateDefaultInitParams()); |
| 79 InitializeProcessManager(); | |
| 80 } | 79 } |
| 81 | 80 |
| 82 void KeywordExtensionsDelegateImplTest::RunTest(bool incognito) { | 81 void KeywordExtensionsDelegateImplTest::RunTest(bool incognito) { |
| 83 TemplateURLService empty_model(NULL, 0); | 82 TemplateURLService empty_model(NULL, 0); |
| 84 scoped_refptr<KeywordProvider> keyword_provider = | 83 scoped_refptr<KeywordProvider> keyword_provider = |
| 85 new KeywordProvider(NULL, &empty_model); | 84 new KeywordProvider(NULL, &empty_model); |
| 86 | 85 |
| 87 // Load an extension. | 86 // Load an extension. |
| 88 { | 87 { |
| 89 base::FilePath path; | 88 base::FilePath path; |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 RunTest(false); | 133 RunTest(false); |
| 135 } | 134 } |
| 136 | 135 |
| 137 TEST_F(KeywordExtensionsDelegateImplTest, IsEnabledExtensionIncognito) { | 136 TEST_F(KeywordExtensionsDelegateImplTest, IsEnabledExtensionIncognito) { |
| 138 RunTest(true); | 137 RunTest(true); |
| 139 } | 138 } |
| 140 | 139 |
| 141 } // namespace | 140 } // namespace |
| 142 | 141 |
| 143 } // namespace extensions | 142 } // namespace extensions |
| OLD | NEW |