Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(466)

Side by Side Diff: chrome/common/extensions/manifest_handler_unittest.cc

Issue 12813004: Chromium style checker cleanup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/files/file_path.h" 8 #include "base/files/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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 std::vector<std::string> keys) 124 std::vector<std::string> keys)
125 : return_value_(return_value), 125 : return_value_(return_value),
126 always_validate_(always_validate), 126 always_validate_(always_validate),
127 keys_(keys) { 127 keys_(keys) {
128 } 128 }
129 129
130 virtual bool Parse(Extension* extension, string16* error) OVERRIDE { 130 virtual bool Parse(Extension* extension, string16* error) OVERRIDE {
131 return true; 131 return true;
132 } 132 }
133 133
134 virtual bool Validate(const Extension* extension, 134 virtual bool Validate(
135 std::string* error, 135 const Extension* extension,
136 std::vector<InstallWarning>* warnings) const { 136 std::string* error,
137 std::vector<InstallWarning>* warnings) const OVERRIDE {
137 return return_value_; 138 return return_value_;
138 } 139 }
139 140
140 virtual bool AlwaysValidateForType(Manifest::Type type) const { 141 virtual bool AlwaysValidateForType(Manifest::Type type) const OVERRIDE {
141 return always_validate_; 142 return always_validate_;
142 } 143 }
143 144
144 private: 145 private:
145 virtual const std::vector<std::string> Keys() const OVERRIDE { 146 virtual const std::vector<std::string> Keys() const OVERRIDE {
146 return keys_; 147 return keys_;
147 } 148 }
148 149
149 bool return_value_; 150 bool return_value_;
150 bool always_validate_; 151 bool always_validate_;
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 EXPECT_TRUE(ManifestHandler::ValidateExtension( 257 EXPECT_TRUE(ManifestHandler::ValidateExtension(
257 extension, &error, &warnings)); 258 extension, &error, &warnings));
258 259
259 // Validates "a" and fails. 260 // Validates "a" and fails.
260 (new TestManifestValidator(false, true, SingleKey("a")))->Register(); 261 (new TestManifestValidator(false, true, SingleKey("a")))->Register();
261 EXPECT_FALSE(ManifestHandler::ValidateExtension( 262 EXPECT_FALSE(ManifestHandler::ValidateExtension(
262 extension, &error, &warnings)); 263 extension, &error, &warnings));
263 } 264 }
264 265
265 } // namespace extensions 266 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698