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

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

Issue 11413050: chrome/browser: Update calls from RunAllPending() to RunUntilIdle(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 &loop_)); 68 &loop_));
69 // It will delete itself. 69 // It will delete itself.
70 client_ = new MockSandboxedUnpackerClient; 70 client_ = new MockSandboxedUnpackerClient;
71 client_->DelegateToFake(); 71 client_->DelegateToFake();
72 } 72 }
73 73
74 virtual void TearDown() { 74 virtual void TearDown() {
75 // Need to destruct SandboxedUnpacker before the message loop since 75 // Need to destruct SandboxedUnpacker before the message loop since
76 // it posts a task to it. 76 // it posts a task to it.
77 sandboxed_unpacker_ = NULL; 77 sandboxed_unpacker_ = NULL;
78 loop_.RunAllPending(); 78 loop_.RunUntilIdle();
79 } 79 }
80 80
81 void SetupUnpacker(const std::string& crx_name) { 81 void SetupUnpacker(const std::string& crx_name) {
82 FilePath original_path; 82 FilePath original_path;
83 ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &original_path)); 83 ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &original_path));
84 original_path = original_path.AppendASCII("extensions") 84 original_path = original_path.AppendASCII("extensions")
85 .AppendASCII("unpacker") 85 .AppendASCII("unpacker")
86 .AppendASCII(crx_name); 86 .AppendASCII(crx_name);
87 ASSERT_TRUE(file_util::PathExists(original_path)) << original_path.value(); 87 ASSERT_TRUE(file_util::PathExists(original_path)) << original_path.value();
88 88
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 // Check that there is newer _locales/en_US/messages.json file. 215 // Check that there is newer _locales/en_US/messages.json file.
216 base::PlatformFileInfo new_info; 216 base::PlatformFileInfo new_info;
217 EXPECT_TRUE(file_util::GetFileInfo(messages_file, &new_info)); 217 EXPECT_TRUE(file_util::GetFileInfo(messages_file, &new_info));
218 218
219 EXPECT_TRUE(new_info.last_modified > old_info.last_modified); 219 EXPECT_TRUE(new_info.last_modified > old_info.last_modified);
220 220
221 ASSERT_TRUE(TempFilesRemoved()); 221 ASSERT_TRUE(TempFilesRemoved());
222 } 222 }
223 223
224 } // namespace extensions 224 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extensions_quota_service_unittest.cc ('k') | chrome/browser/extensions/settings/settings_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698