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

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

Issue 19579005: Move ReadFileToString to the base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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 "chrome/browser/extensions/component_loader.h" 5 #include "chrome/browser/extensions/component_loader.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 } 81 }
82 82
83 virtual void SetUp() OVERRIDE { 83 virtual void SetUp() OVERRIDE {
84 extension_path_ = 84 extension_path_ =
85 GetBasePath().AppendASCII("good") 85 GetBasePath().AppendASCII("good")
86 .AppendASCII("Extensions") 86 .AppendASCII("Extensions")
87 .AppendASCII("behllobkkfkfnphdnhnkndlbkcpglgmj") 87 .AppendASCII("behllobkkfkfnphdnhnkndlbkcpglgmj")
88 .AppendASCII("1.0.0.0"); 88 .AppendASCII("1.0.0.0");
89 89
90 // Read in the extension manifest. 90 // Read in the extension manifest.
91 ASSERT_TRUE(file_util::ReadFileToString( 91 ASSERT_TRUE(base::ReadFileToString(
92 extension_path_.Append(kManifestFilename), 92 extension_path_.Append(kManifestFilename),
93 &manifest_contents_)); 93 &manifest_contents_));
94 94
95 // Register the local state prefs. 95 // Register the local state prefs.
96 #if defined(OS_CHROMEOS) 96 #if defined(OS_CHROMEOS)
97 local_state_.registry()->RegisterBooleanPref( 97 local_state_.registry()->RegisterBooleanPref(
98 prefs::kSpokenFeedbackEnabled, false); 98 prefs::kSpokenFeedbackEnabled, false);
99 #endif 99 #endif
100 } 100 }
101 101
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 component_loader_.AddOrReplace(known_extension); 261 component_loader_.AddOrReplace(known_extension);
262 EXPECT_EQ(default_count + 1, extension_service_.extensions()->size()); 262 EXPECT_EQ(default_count + 1, extension_service_.extensions()->size());
263 EXPECT_EQ(1u, extension_service_.unloaded_count()); 263 EXPECT_EQ(1u, extension_service_.unloaded_count());
264 264
265 // Add an invalid component extension. 265 // Add an invalid component extension.
266 std::string extension_id = component_loader_.AddOrReplace(invalid_extension); 266 std::string extension_id = component_loader_.AddOrReplace(invalid_extension);
267 EXPECT_TRUE(extension_id.empty()); 267 EXPECT_TRUE(extension_id.empty());
268 } 268 }
269 269
270 } // namespace extensions 270 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/push_messaging/sync_setup_helper.cc ('k') | chrome/browser/extensions/convert_user_script.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698