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

Side by Side Diff: webkit/fileapi/local_file_system_test_helper.cc

Issue 11595003: webkit: Update the calls from RunAllPending() to RunUntilIdle(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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 "webkit/fileapi/local_file_system_test_helper.h" 5 #include "webkit/fileapi/local_file_system_test_helper.h"
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/message_loop_proxy.h" 9 #include "base/message_loop_proxy.h"
10 #include "googleurl/src/gurl.h" 10 #include "googleurl/src/gurl.h"
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 DCHECK(file_util_); 98 DCHECK(file_util_);
99 99
100 // Initialize the usage cache file. 100 // Initialize the usage cache file.
101 FilePath usage_cache_path = GetUsageCachePath(); 101 FilePath usage_cache_path = GetUsageCachePath();
102 if (!usage_cache_path.empty()) 102 if (!usage_cache_path.empty())
103 FileSystemUsageCache::UpdateUsage(usage_cache_path, 0); 103 FileSystemUsageCache::UpdateUsage(usage_cache_path, 0);
104 } 104 }
105 105
106 void LocalFileSystemTestOriginHelper::TearDown() { 106 void LocalFileSystemTestOriginHelper::TearDown() {
107 file_system_context_ = NULL; 107 file_system_context_ = NULL;
108 MessageLoop::current()->RunAllPending(); 108 MessageLoop::current()->RunUntilIdle();
109 } 109 }
110 110
111 FilePath LocalFileSystemTestOriginHelper::GetOriginRootPath() const { 111 FilePath LocalFileSystemTestOriginHelper::GetOriginRootPath() const {
112 return file_system_context_->GetMountPointProvider(type_)-> 112 return file_system_context_->GetMountPointProvider(type_)->
113 GetFileSystemRootPathOnFileThread( 113 GetFileSystemRootPathOnFileThread(
114 FileSystemURL(origin_, type_, FilePath()), false); 114 FileSystemURL(origin_, type_, FilePath()), false);
115 } 115 }
116 116
117 FilePath LocalFileSystemTestOriginHelper::GetLocalPath(const FilePath& path) { 117 FilePath LocalFileSystemTestOriginHelper::GetLocalPath(const FilePath& path) {
118 DCHECK(file_util_); 118 DCHECK(file_util_);
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 LocalFileSystemTestOriginHelper::NewOperationContext() { 188 LocalFileSystemTestOriginHelper::NewOperationContext() {
189 DCHECK(file_system_context_.get()); 189 DCHECK(file_system_context_.get());
190 FileSystemOperationContext* context = 190 FileSystemOperationContext* context =
191 new FileSystemOperationContext(file_system_context_.get()); 191 new FileSystemOperationContext(file_system_context_.get());
192 context->set_update_observers( 192 context->set_update_observers(
193 *file_system_context_->GetUpdateObservers(type_)); 193 *file_system_context_->GetUpdateObservers(type_));
194 return context; 194 return context;
195 } 195 }
196 196
197 } // namespace fileapi 197 } // namespace fileapi
OLDNEW
« no previous file with comments | « webkit/fileapi/local_file_system_quota_unittest.cc ('k') | webkit/fileapi/media/native_media_file_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698