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

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

Issue 18332014: Move Copy* into the base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: windows 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 <vector> 5 #include <vector>
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 63
64 preferences_file_ = profile_dir.AppendASCII("Preferences"); 64 preferences_file_ = profile_dir.AppendASCII("Preferences");
65 user_scripts_dir_ = profile_dir.AppendASCII("User Scripts"); 65 user_scripts_dir_ = profile_dir.AppendASCII("User Scripts");
66 extensions_dir_ = profile_dir.AppendASCII("Extensions"); 66 extensions_dir_ = profile_dir.AppendASCII("Extensions");
67 67
68 if (enable_extensions_ && load_extensions_.empty()) { 68 if (enable_extensions_ && load_extensions_.empty()) {
69 base::FilePath src_dir; 69 base::FilePath src_dir;
70 PathService::Get(chrome::DIR_TEST_DATA, &src_dir); 70 PathService::Get(chrome::DIR_TEST_DATA, &src_dir);
71 src_dir = src_dir.AppendASCII("extensions").AppendASCII("good"); 71 src_dir = src_dir.AppendASCII("extensions").AppendASCII("good");
72 72
73 file_util::CopyFile(src_dir.AppendASCII("Preferences"), 73 base::CopyFile(src_dir.AppendASCII("Preferences"), preferences_file_);
74 preferences_file_); 74 base::CopyDirectory(src_dir.AppendASCII("Extensions"),
75 file_util::CopyDirectory(src_dir.AppendASCII("Extensions"), 75 profile_dir, true); // recursive
76 profile_dir, true); // recursive
77 } 76 }
78 return true; 77 return true;
79 } 78 }
80 79
81 virtual void TearDown() { 80 virtual void TearDown() {
82 EXPECT_TRUE(base::Delete(preferences_file_, false)); 81 EXPECT_TRUE(base::Delete(preferences_file_, false));
83 82
84 // TODO(phajdan.jr): Check return values of the functions below, carefully. 83 // TODO(phajdan.jr): Check return values of the functions below, carefully.
85 base::Delete(user_scripts_dir_, true); 84 base::Delete(user_scripts_dir_, true);
86 base::Delete(extensions_dir_, true); 85 base::Delete(extensions_dir_, true);
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 .AppendASCII("extensions") 268 .AppendASCII("extensions")
270 .AppendASCII("app2"); 269 .AppendASCII("app2");
271 load_extensions_.push_back(fourth_extension_path.value()); 270 load_extensions_.push_back(fourth_extension_path.value());
272 } 271 }
273 }; 272 };
274 273
275 IN_PROC_BROWSER_TEST_F(ExtensionsLoadMultipleTest, Test) { 274 IN_PROC_BROWSER_TEST_F(ExtensionsLoadMultipleTest, Test) {
276 WaitForServicesToStart(4, true); 275 WaitForServicesToStart(4, true);
277 TestInjection(true, true); 276 TestInjection(true, true);
278 } 277 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_service_unittest.cc ('k') | chrome/browser/extensions/pack_extension_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698