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

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

Issue 12091115: Allow manifest handlers to declare keys they depend on that must be parsed before them. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: dcronin Created 7 years, 10 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/scoped_temp_dir.h" 6 #include "base/files/scoped_temp_dir.h"
7 #include "base/memory/ref_counted.h" 7 #include "base/memory/ref_counted.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 virtual void SetUp() { 62 virtual void SetUp() {
63 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); 63 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
64 ASSERT_TRUE(extensions_dir_.CreateUniqueTempDir()); 64 ASSERT_TRUE(extensions_dir_.CreateUniqueTempDir());
65 file_thread_.reset(new content::TestBrowserThread(BrowserThread::FILE, 65 file_thread_.reset(new content::TestBrowserThread(BrowserThread::FILE,
66 &loop_)); 66 &loop_));
67 // It will delete itself. 67 // It will delete itself.
68 client_ = new MockSandboxedUnpackerClient; 68 client_ = new MockSandboxedUnpackerClient;
69 client_->DelegateToFake(); 69 client_->DelegateToFake();
70 extensions::ManifestHandler::Register( 70 extensions::ManifestHandler::Register(
71 extension_manifest_keys::kDefaultLocale, 71 extension_manifest_keys::kDefaultLocale,
72 new extensions::DefaultLocaleHandler); 72 make_linked_ptr(new extensions::DefaultLocaleHandler));
73 } 73 }
74 74
75 virtual void TearDown() { 75 virtual void TearDown() {
76 // Need to destruct SandboxedUnpacker before the message loop since 76 // Need to destruct SandboxedUnpacker before the message loop since
77 // it posts a task to it. 77 // it posts a task to it.
78 sandboxed_unpacker_ = NULL; 78 sandboxed_unpacker_ = NULL;
79 loop_.RunUntilIdle(); 79 loop_.RunUntilIdle();
80 } 80 }
81 81
82 void SetupUnpacker(const std::string& crx_name) { 82 void SetupUnpacker(const std::string& crx_name) {
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 // Check that there is newer _locales/en_US/messages.json file. 216 // Check that there is newer _locales/en_US/messages.json file.
217 base::PlatformFileInfo new_info; 217 base::PlatformFileInfo new_info;
218 EXPECT_TRUE(file_util::GetFileInfo(messages_file, &new_info)); 218 EXPECT_TRUE(file_util::GetFileInfo(messages_file, &new_info));
219 219
220 EXPECT_TRUE(new_info.last_modified > old_info.last_modified); 220 EXPECT_TRUE(new_info.last_modified > old_info.last_modified);
221 221
222 ASSERT_TRUE(TempFilesRemoved()); 222 ASSERT_TRUE(TempFilesRemoved());
223 } 223 }
224 224
225 } // namespace extensions 225 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/manifest_url_parser.cc ('k') | chrome/browser/extensions/updater/extension_updater_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698