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

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

Issue 112963005: Update uses of UTF conversions in courgette/, device/, extensions/, google_apis/, gpu/, ipc/, media… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 12 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
« no previous file with comments | « extensions/common/extension.cc ('k') | extensions/common/manifest_handlers/background_info.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 105
106 class FailingTestManifestHandler : public TestManifestHandler { 106 class FailingTestManifestHandler : public TestManifestHandler {
107 public: 107 public:
108 FailingTestManifestHandler(const std::string& name, 108 FailingTestManifestHandler(const std::string& name,
109 const std::vector<std::string>& keys, 109 const std::vector<std::string>& keys,
110 const std::vector<std::string>& prereqs, 110 const std::vector<std::string>& prereqs,
111 ParsingWatcher* watcher) 111 ParsingWatcher* watcher)
112 : TestManifestHandler(name, keys, prereqs, watcher) { 112 : TestManifestHandler(name, keys, prereqs, watcher) {
113 } 113 }
114 virtual bool Parse(Extension* extension, base::string16* error) OVERRIDE { 114 virtual bool Parse(Extension* extension, base::string16* error) OVERRIDE {
115 *error = ASCIIToUTF16(name_); 115 *error = base::ASCIIToUTF16(name_);
116 return false; 116 return false;
117 } 117 }
118 }; 118 };
119 119
120 class AlwaysParseTestManifestHandler : public TestManifestHandler { 120 class AlwaysParseTestManifestHandler : public TestManifestHandler {
121 public: 121 public:
122 AlwaysParseTestManifestHandler(const std::string& name, 122 AlwaysParseTestManifestHandler(const std::string& name,
123 const std::vector<std::string>& keys, 123 const std::vector<std::string>& keys,
124 const std::vector<std::string>& prereqs, 124 const std::vector<std::string>& prereqs,
125 ParsingWatcher* watcher) 125 ParsingWatcher* watcher)
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 EXPECT_TRUE( 272 EXPECT_TRUE(
273 ManifestHandler::ValidateExtension(extension.get(), &error, &warnings)); 273 ManifestHandler::ValidateExtension(extension.get(), &error, &warnings));
274 274
275 // Validates "a" and fails. 275 // Validates "a" and fails.
276 (new TestManifestValidator(false, true, SingleKey("a")))->Register(); 276 (new TestManifestValidator(false, true, SingleKey("a")))->Register();
277 EXPECT_FALSE( 277 EXPECT_FALSE(
278 ManifestHandler::ValidateExtension(extension.get(), &error, &warnings)); 278 ManifestHandler::ValidateExtension(extension.get(), &error, &warnings));
279 } 279 }
280 280
281 } // namespace extensions 281 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/common/extension.cc ('k') | extensions/common/manifest_handlers/background_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698