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

Side by Side Diff: chrome/browser/browsing_data/browsing_data_file_system_helper_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 "testing/gtest/include/gtest/gtest.h" 5 #include "testing/gtest/include/gtest/gtest.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/platform_file.h" 10 #include "base/platform_file.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 webkit_thread_(BrowserThread::WEBKIT_DEPRECATED, &message_loop_), 67 webkit_thread_(BrowserThread::WEBKIT_DEPRECATED, &message_loop_),
68 file_thread_(BrowserThread::FILE, &message_loop_), 68 file_thread_(BrowserThread::FILE, &message_loop_),
69 file_user_blocking_thread_( 69 file_user_blocking_thread_(
70 BrowserThread::FILE_USER_BLOCKING, &message_loop_), 70 BrowserThread::FILE_USER_BLOCKING, &message_loop_),
71 io_thread_(BrowserThread::IO, &message_loop_) { 71 io_thread_(BrowserThread::IO, &message_loop_) {
72 profile_.reset(new TestingProfile()); 72 profile_.reset(new TestingProfile());
73 73
74 helper_ = BrowsingDataFileSystemHelper::Create( 74 helper_ = BrowsingDataFileSystemHelper::Create(
75 BrowserContext::GetDefaultStoragePartition(profile_.get())-> 75 BrowserContext::GetDefaultStoragePartition(profile_.get())->
76 GetFileSystemContext()); 76 GetFileSystemContext());
77 message_loop_.RunAllPending(); 77 message_loop_.RunUntilIdle();
78 canned_helper_ = new CannedBrowsingDataFileSystemHelper(profile_.get()); 78 canned_helper_ = new CannedBrowsingDataFileSystemHelper(profile_.get());
79 } 79 }
80 virtual ~BrowsingDataFileSystemHelperTest() { 80 virtual ~BrowsingDataFileSystemHelperTest() {
81 // Avoid memory leaks. 81 // Avoid memory leaks.
82 profile_.reset(); 82 profile_.reset();
83 message_loop_.RunAllPending(); 83 message_loop_.RunUntilIdle();
84 } 84 }
85 85
86 TestingProfile* GetProfile() { 86 TestingProfile* GetProfile() {
87 return profile_.get(); 87 return profile_.get();
88 } 88 }
89 89
90 // Blocks on the current MessageLoop until Notify() is called. 90 // Blocks on the current MessageLoop until Notify() is called.
91 void BlockUntilNotified() { 91 void BlockUntilNotified() {
92 MessageLoop::current()->Run(); 92 MessageLoop::current()->Run();
93 } 93 }
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 // extension and devtools schemes. 313 // extension and devtools schemes.
314 TEST_F(BrowsingDataFileSystemHelperTest, IgnoreExtensionsAndDevTools) { 314 TEST_F(BrowsingDataFileSystemHelperTest, IgnoreExtensionsAndDevTools) {
315 ASSERT_TRUE(canned_helper_->empty()); 315 ASSERT_TRUE(canned_helper_->empty());
316 canned_helper_->AddFileSystem(kOriginExt, kTemporary, 0); 316 canned_helper_->AddFileSystem(kOriginExt, kTemporary, 0);
317 ASSERT_TRUE(canned_helper_->empty()); 317 ASSERT_TRUE(canned_helper_->empty());
318 canned_helper_->AddFileSystem(kOriginDevTools, kTemporary, 0); 318 canned_helper_->AddFileSystem(kOriginDevTools, kTemporary, 0);
319 ASSERT_TRUE(canned_helper_->empty()); 319 ASSERT_TRUE(canned_helper_->empty());
320 } 320 }
321 321
322 } // namespace 322 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698