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

Side by Side Diff: chrome/browser/extensions/extension_ui_unittest.cc

Issue 19547009: Move ".crx"/".pem" constants and extension_filenames constants into extensions/common/constants.cc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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) 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/json/json_file_value_serializer.h" 6 #include "base/json/json_file_value_serializer.h"
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "chrome/browser/extensions/extension_service.h" 10 #include "chrome/browser/extensions/extension_service.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 return static_cast<DictionaryValue*>(value); 66 return static_cast<DictionaryValue*>(value);
67 } 67 }
68 68
69 DictionaryValue* CreateExtensionDetailViewFromPath( 69 DictionaryValue* CreateExtensionDetailViewFromPath(
70 const base::FilePath& extension_path, 70 const base::FilePath& extension_path,
71 const std::vector<ExtensionPage>& pages, 71 const std::vector<ExtensionPage>& pages,
72 Manifest::Location location) { 72 Manifest::Location location) {
73 std::string error; 73 std::string error;
74 74
75 base::FilePath manifest_path = extension_path.Append( 75 base::FilePath manifest_path = extension_path.Append(
76 extensions::kManifestFilename); 76 extensions::filenames::kManifestFilename);
77 scoped_ptr<DictionaryValue> extension_data(DeserializeJSONTestData( 77 scoped_ptr<DictionaryValue> extension_data(DeserializeJSONTestData(
78 manifest_path, &error)); 78 manifest_path, &error));
79 EXPECT_EQ("", error); 79 EXPECT_EQ("", error);
80 80
81 scoped_refptr<Extension> extension(Extension::Create( 81 scoped_refptr<Extension> extension(Extension::Create(
82 extension_path, location, *extension_data, Extension::REQUIRE_KEY, 82 extension_path, location, *extension_data, Extension::REQUIRE_KEY,
83 &error)); 83 &error));
84 EXPECT_TRUE(extension.get()); 84 EXPECT_TRUE(extension.get());
85 EXPECT_EQ("", error); 85 EXPECT_EQ("", error);
86 86
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 272
273 scoped_ptr<DictionaryValue> extension_details( 273 scoped_ptr<DictionaryValue> extension_details(
274 CreateExtensionDetailViewFromPath( 274 CreateExtensionDetailViewFromPath(
275 extension_path, pages, Manifest::UNPACKED)); 275 extension_path, pages, Manifest::UNPACKED));
276 276
277 base::FilePath::StringType ui_path; 277 base::FilePath::StringType ui_path;
278 278
279 EXPECT_TRUE(extension_details->GetString("path", &ui_path)); 279 EXPECT_TRUE(extension_details->GetString("path", &ui_path));
280 EXPECT_EQ(extension_path, base::FilePath(ui_path)); 280 EXPECT_EQ(extension_path, base::FilePath(ui_path));
281 } 281 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698