| 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 void ScopedExtensionLoadObserver::OnExtensionInstalled( | 55 void ScopedExtensionLoadObserver::OnExtensionInstalled( |
| 56 content::BrowserContext* browser_context, | 56 content::BrowserContext* browser_context, |
| 57 const Extension* extension, | 57 const Extension* extension, |
| 58 bool is_update) { | 58 bool is_update) { |
| 59 quit_closure_.Run(); | 59 quit_closure_.Run(); |
| 60 } | 60 } |
| 61 | 61 |
| 62 class KeywordExtensionsDelegateImplTest : public ExtensionServiceTestBase { | 62 class KeywordExtensionsDelegateImplTest : public ExtensionServiceTestBase { |
| 63 public: | 63 public: |
| 64 KeywordExtensionsDelegateImplTest() {} | 64 KeywordExtensionsDelegateImplTest() {} |
| 65 virtual ~KeywordExtensionsDelegateImplTest() {} | 65 ~KeywordExtensionsDelegateImplTest() override {} |
| 66 | 66 |
| 67 protected: | 67 protected: |
| 68 virtual void SetUp() override; | 68 void SetUp() override; |
| 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()); |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 RunTest(false); | 134 RunTest(false); |
| 135 } | 135 } |
| 136 | 136 |
| 137 TEST_F(KeywordExtensionsDelegateImplTest, IsEnabledExtensionIncognito) { | 137 TEST_F(KeywordExtensionsDelegateImplTest, IsEnabledExtensionIncognito) { |
| 138 RunTest(true); | 138 RunTest(true); |
| 139 } | 139 } |
| 140 | 140 |
| 141 } // namespace | 141 } // namespace |
| 142 | 142 |
| 143 } // namespace extensions | 143 } // namespace extensions |
| OLD | NEW |