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 "base/bind.h" | 5 #include "base/bind.h" |
6 #include "base/bind_helpers.h" | 6 #include "base/bind_helpers.h" |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "chrome/browser/extensions/api/declarative/rules_registry_service.h" | 9 #include "chrome/browser/extensions/api/declarative/rules_registry_service.h" |
10 #include "chrome/browser/extensions/api/declarative_webrequest/webrequest_consta
nts.h" | 10 #include "chrome/browser/extensions/api/declarative_webrequest/webrequest_consta
nts.h" |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 extensions::declarative_webrequest_constants::kOnRequest); | 52 extensions::declarative_webrequest_constants::kOnRequest); |
53 | 53 |
54 std::vector<linked_ptr<RulesRegistry::Rule> > known_rules; | 54 std::vector<linked_ptr<RulesRegistry::Rule> > known_rules; |
55 | 55 |
56 content::BrowserThread::PostTask( | 56 content::BrowserThread::PostTask( |
57 rules_registry->GetOwnerThread(), | 57 rules_registry->GetOwnerThread(), |
58 FROM_HERE, | 58 FROM_HERE, |
59 base::Bind(base::IgnoreResult(&RulesRegistry::GetAllRules), | 59 base::Bind(base::IgnoreResult(&RulesRegistry::GetAllRules), |
60 rules_registry, extension_id, &known_rules)); | 60 rules_registry, extension_id, &known_rules)); |
61 | 61 |
62 ui_test_utils::RunAllPendingInMessageLoop(rules_registry->GetOwnerThread()); | 62 content::RunAllPendingInMessageLoop(rules_registry->GetOwnerThread()); |
63 | 63 |
64 EXPECT_TRUE(known_rules.empty()); | 64 EXPECT_TRUE(known_rules.empty()); |
65 } | 65 } |
OLD | NEW |