Chromium Code Reviews| 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/command_line.h" | 5 #include "base/command_line.h" |
| 6 #include "base/memory/scoped_ptr.h" | 6 #include "base/memory/scoped_ptr.h" |
| 7 #include "chrome/browser/extensions/api/declarative/rules_registry_service.h" | 7 #include "chrome/browser/extensions/api/declarative/rules_registry_service.h" |
| 8 #include "chrome/browser/extensions/api/declarative/test_rules_registry.h" | 8 #include "chrome/browser/extensions/api/declarative/test_rules_registry.h" |
| 9 #include "chrome/browser/extensions/extension_apitest.h" | 9 #include "chrome/browser/extensions/extension_apitest.h" |
| 10 #include "chrome/browser/extensions/extension_service.h" | 10 #include "chrome/browser/extensions/extension_service.h" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 46 }; | 46 }; |
| 47 | 47 |
| 48 IN_PROC_BROWSER_TEST_F(DeclarativeApiTest, DeclarativeApi) { | 48 IN_PROC_BROWSER_TEST_F(DeclarativeApiTest, DeclarativeApi) { |
| 49 RegisterTestRuleRegistry(); | 49 RegisterTestRuleRegistry(); |
| 50 ASSERT_TRUE(RunExtensionTest("declarative/api")) << message_; | 50 ASSERT_TRUE(RunExtensionTest("declarative/api")) << message_; |
| 51 | 51 |
| 52 // Check that unloading the page has removed all rules. | 52 // Check that unloading the page has removed all rules. |
| 53 std::string extension_id = GetSingleLoadedExtension()->id(); | 53 std::string extension_id = GetSingleLoadedExtension()->id(); |
| 54 UnloadExtension(extension_id); | 54 UnloadExtension(extension_id); |
| 55 | 55 |
| 56 std::vector<std::string> rule_identifiers; // Empty to get all rules. | 56 std::vector<std::string> rule_identifiers; // Empty to get all rules. |
|
not at google - send to devlin
2012/02/20 11:50:51
Just noticed this... comment is inaccurate (post l
battre
2012/02/28 22:29:18
Done.
| |
| 57 std::vector<DictionaryValue*> known_rules; | 57 std::vector<linked_ptr<RulesRegistry::Rule> > known_rules; |
| 58 test_rules_registry_->GetRules(extension_id, | 58 test_rules_registry_->GetRules(extension_id, |
| 59 rule_identifiers, | 59 rule_identifiers, |
| 60 &known_rules); | 60 &known_rules); |
| 61 EXPECT_TRUE(known_rules.empty()); | 61 EXPECT_TRUE(known_rules.empty()); |
| 62 } | 62 } |
| OLD | NEW |