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

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

Issue 18119009: Make utility process run in-process when running in single-process mode. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: undo unnecessary changes 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/file_util.h" 5 #include "base/file_util.h"
6 #include "base/files/file_enumerator.h" 6 #include "base/files/file_enumerator.h"
7 #include "base/files/scoped_temp_dir.h" 7 #include "base/files/scoped_temp_dir.h"
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 unpacker_.reset(new Unpacker( 95 unpacker_.reset(new Unpacker(
96 crx_path, std::string(), Manifest::INTERNAL, Extension::NO_FLAGS)); 96 crx_path, std::string(), Manifest::INTERNAL, Extension::NO_FLAGS));
97 97
98 // Build a temp area where the extension will be unpacked. 98 // Build a temp area where the extension will be unpacked.
99 temp_path_ = 99 temp_path_ =
100 temp_dir_.path().AppendASCII("sandboxed_unpacker_test_Temp"); 100 temp_dir_.path().AppendASCII("sandboxed_unpacker_test_Temp");
101 ASSERT_TRUE(file_util::CreateDirectory(temp_path_)); 101 ASSERT_TRUE(file_util::CreateDirectory(temp_path_));
102 102
103 sandboxed_unpacker_ = new SandboxedUnpacker( 103 sandboxed_unpacker_ = new SandboxedUnpacker(
104 crx_path, 104 crx_path,
105 false,
106 Manifest::INTERNAL, 105 Manifest::INTERNAL,
107 Extension::NO_FLAGS, 106 Extension::NO_FLAGS,
108 extensions_dir_.path(), 107 extensions_dir_.path(),
109 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE).get(), 108 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE).get(),
110 client_); 109 client_);
111 110
112 EXPECT_TRUE(PrepareUnpackerEnv()); 111 EXPECT_TRUE(PrepareUnpackerEnv());
113 } 112 }
114 113
115 bool PrepareUnpackerEnv() { 114 bool PrepareUnpackerEnv() {
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 // Check that there is newer _locales/en_US/messages.json file. 214 // Check that there is newer _locales/en_US/messages.json file.
216 base::PlatformFileInfo new_info; 215 base::PlatformFileInfo new_info;
217 EXPECT_TRUE(file_util::GetFileInfo(messages_file, &new_info)); 216 EXPECT_TRUE(file_util::GetFileInfo(messages_file, &new_info));
218 217
219 EXPECT_TRUE(new_info.last_modified > old_info.last_modified); 218 EXPECT_TRUE(new_info.last_modified > old_info.last_modified);
220 219
221 ASSERT_TRUE(TempFilesRemoved()); 220 ASSERT_TRUE(TempFilesRemoved());
222 } 221 }
223 222
224 } // namespace extensions 223 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/sandboxed_unpacker.cc ('k') | chrome/browser/extensions/startup_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698