OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 <string> | 5 #include <string> |
6 #include <vector> | 6 #include <vector> |
7 | 7 |
8 #include "base/file_path.h" | 8 #include "base/file_path.h" |
9 #include "base/stl_util.h" | 9 #include "base/stl_util.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 ParsingWatcher* watcher) | 93 ParsingWatcher* watcher) |
94 : TestManifestHandler(name, prereqs, watcher) { | 94 : TestManifestHandler(name, prereqs, watcher) { |
95 } | 95 } |
96 | 96 |
97 virtual bool AlwaysParseForType(Manifest::Type type) OVERRIDE { | 97 virtual bool AlwaysParseForType(Manifest::Type type) OVERRIDE { |
98 return true; | 98 return true; |
99 } | 99 } |
100 }; | 100 }; |
101 | 101 |
102 protected: | 102 protected: |
103 virtual void SetUp() OVERRIDE { | 103 virtual void TearDown() OVERRIDE { |
104 ManifestHandler::ClearRegistryForTesting(); | 104 ManifestHandler::ClearRegistryForTesting(); |
105 } | 105 } |
106 }; | 106 }; |
107 | 107 |
108 TEST_F(ManifestHandlerTest, DependentHandlers) { | 108 TEST_F(ManifestHandlerTest, DependentHandlers) { |
109 ParsingWatcher watcher; | 109 ParsingWatcher watcher; |
110 std::vector<std::string> prereqs; | 110 std::vector<std::string> prereqs; |
111 ManifestHandler::Register( | 111 ManifestHandler::Register( |
112 "a", make_linked_ptr(new TestManifestHandler("A", prereqs, &watcher))); | 112 "a", make_linked_ptr(new TestManifestHandler("A", prereqs, &watcher))); |
113 ManifestHandler::Register( | 113 ManifestHandler::Register( |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 base::FilePath(), | 181 base::FilePath(), |
182 Manifest::INVALID_LOCATION, | 182 Manifest::INVALID_LOCATION, |
183 *manifest_a, | 183 *manifest_a, |
184 Extension::NO_FLAGS, | 184 Extension::NO_FLAGS, |
185 &error); | 185 &error); |
186 EXPECT_FALSE(extension); | 186 EXPECT_FALSE(extension); |
187 EXPECT_EQ("A", error); | 187 EXPECT_EQ("A", error); |
188 } | 188 } |
189 | 189 |
190 } // namespace extensions | 190 } // namespace extensions |
OLD | NEW |