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 #ifndef CHROME_COMMON_EXTENSIONS_MANIFEST_TESTS_EXTENSION_MANIFEST_TEST_H_ | 5 #ifndef CHROME_COMMON_EXTENSIONS_MANIFEST_TESTS_EXTENSION_MANIFEST_TEST_H_ |
6 #define CHROME_COMMON_EXTENSIONS_MANIFEST_TESTS_EXTENSION_MANIFEST_TEST_H_ | 6 #define CHROME_COMMON_EXTENSIONS_MANIFEST_TESTS_EXTENSION_MANIFEST_TEST_H_ |
7 | 7 |
8 #include "base/values.h" | 8 #include "base/values.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "chrome/common/extensions/extension.h" | 10 #include "chrome/common/extensions/extension.h" |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 extensions::Extension::Location location = | 97 extensions::Extension::Location location = |
98 extensions::Extension::INTERNAL, | 98 extensions::Extension::INTERNAL, |
99 int flags = extensions::Extension::NO_FLAGS); | 99 int flags = extensions::Extension::NO_FLAGS); |
100 | 100 |
101 void LoadAndExpectError(const Manifest& manifest, | 101 void LoadAndExpectError(const Manifest& manifest, |
102 const std::string& expected_error, | 102 const std::string& expected_error, |
103 extensions::Extension::Location location = | 103 extensions::Extension::Location location = |
104 extensions::Extension::INTERNAL, | 104 extensions::Extension::INTERNAL, |
105 int flags = extensions::Extension::NO_FLAGS); | 105 int flags = extensions::Extension::NO_FLAGS); |
106 | 106 |
107 void AddPattern(URLPatternSet* extent, const std::string& pattern); | 107 void AddPattern(extensions::URLPatternSet* extent, |
| 108 const std::string& pattern); |
108 | 109 |
109 // used to differentiate between calls to LoadAndExpectError, | 110 // used to differentiate between calls to LoadAndExpectError, |
110 // LoadAndExpectWarning and LoadAndExpectSuccess via function RunTestcases. | 111 // LoadAndExpectWarning and LoadAndExpectSuccess via function RunTestcases. |
111 enum EXPECT_TYPE { | 112 enum EXPECT_TYPE { |
112 EXPECT_TYPE_ERROR, | 113 EXPECT_TYPE_ERROR, |
113 EXPECT_TYPE_WARNING, | 114 EXPECT_TYPE_WARNING, |
114 EXPECT_TYPE_SUCCESS | 115 EXPECT_TYPE_SUCCESS |
115 }; | 116 }; |
116 | 117 |
117 struct Testcase { | 118 struct Testcase { |
(...skipping 22 matching lines...) Expand all Loading... |
140 // Force the manifest tests to run as though they are on trunk, since several | 141 // Force the manifest tests to run as though they are on trunk, since several |
141 // tests rely on manifest features being available that aren't on | 142 // tests rely on manifest features being available that aren't on |
142 // stable/beta. | 143 // stable/beta. |
143 // | 144 // |
144 // These objects nest, so if a test wants to explicitly test the behaviour | 145 // These objects nest, so if a test wants to explicitly test the behaviour |
145 // on stable or beta, declare it inside that test. | 146 // on stable or beta, declare it inside that test. |
146 extensions::Feature::ScopedCurrentChannel current_channel_; | 147 extensions::Feature::ScopedCurrentChannel current_channel_; |
147 }; | 148 }; |
148 | 149 |
149 #endif // CHROME_COMMON_EXTENSIONS_MANIFEST_TESTS_EXTENSION_MANIFEST_TEST_H_ | 150 #endif // CHROME_COMMON_EXTENSIONS_MANIFEST_TESTS_EXTENSION_MANIFEST_TEST_H_ |
OLD | NEW |