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 "extensions/browser/api/declarative/rules_registry_service.h" | 5 #include "extensions/browser/api/declarative/rules_registry_service.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "chrome/test/base/testing_profile.h" | 9 #include "chrome/test/base/testing_profile.h" |
10 #include "content/public/test/test_browser_thread.h" | 10 #include "content/public/test/test_browser_thread.h" |
(...skipping 25 matching lines...) Expand all Loading... |
36 namespace extensions { | 36 namespace extensions { |
37 | 37 |
38 class RulesRegistryServiceTest : public testing::Test { | 38 class RulesRegistryServiceTest : public testing::Test { |
39 public: | 39 public: |
40 RulesRegistryServiceTest() | 40 RulesRegistryServiceTest() |
41 : ui_(content::BrowserThread::UI, &message_loop_), | 41 : ui_(content::BrowserThread::UI, &message_loop_), |
42 io_(content::BrowserThread::IO, &message_loop_) {} | 42 io_(content::BrowserThread::IO, &message_loop_) {} |
43 | 43 |
44 virtual ~RulesRegistryServiceTest() {} | 44 virtual ~RulesRegistryServiceTest() {} |
45 | 45 |
46 virtual void TearDown() OVERRIDE { | 46 virtual void TearDown() override { |
47 // Make sure that deletion traits of all registries are executed. | 47 // Make sure that deletion traits of all registries are executed. |
48 message_loop_.RunUntilIdle(); | 48 message_loop_.RunUntilIdle(); |
49 } | 49 } |
50 | 50 |
51 protected: | 51 protected: |
52 base::MessageLoop message_loop_; | 52 base::MessageLoop message_loop_; |
53 content::TestBrowserThread ui_; | 53 content::TestBrowserThread ui_; |
54 content::TestBrowserThread io_; | 54 content::TestBrowserThread io_; |
55 }; | 55 }; |
56 | 56 |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 RulesRegistryService registry_service(&profile); | 155 RulesRegistryService registry_service(&profile); |
156 RulesRegistry* registry = | 156 RulesRegistry* registry = |
157 registry_service.GetRulesRegistry( | 157 registry_service.GetRulesRegistry( |
158 key, | 158 key, |
159 declarative_webrequest_constants::kOnRequest).get(); | 159 declarative_webrequest_constants::kOnRequest).get(); |
160 EXPECT_TRUE(registry); | 160 EXPECT_TRUE(registry); |
161 EXPECT_FALSE(registry->rules_cache_delegate_for_testing()); | 161 EXPECT_FALSE(registry->rules_cache_delegate_for_testing()); |
162 } | 162 } |
163 | 163 |
164 } // namespace extensions | 164 } // namespace extensions |
OLD | NEW |