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

Side by Side Diff: content/browser/fileapi/file_system_dir_url_request_job_unittest.cc

Issue 2082343002: Remove calls to deprecated MessageLoop methods in content. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: CR Created 4 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 <stdint.h> 5 #include <stdint.h>
6 #include <string> 6 #include <string>
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 delegate_->set_quit_on_redirect(true); 178 delegate_->set_quit_on_redirect(true);
179 job_factory_.reset(new FileSystemDirURLRequestJobFactory( 179 job_factory_.reset(new FileSystemDirURLRequestJobFactory(
180 url.GetOrigin().host(), file_system_context)); 180 url.GetOrigin().host(), file_system_context));
181 empty_context_.set_job_factory(job_factory_.get()); 181 empty_context_.set_job_factory(job_factory_.get());
182 182
183 request_ = empty_context_.CreateRequest( 183 request_ = empty_context_.CreateRequest(
184 url, net::DEFAULT_PRIORITY, delegate_.get()); 184 url, net::DEFAULT_PRIORITY, delegate_.get());
185 request_->Start(); 185 request_->Start();
186 ASSERT_TRUE(request_->is_pending()); // verify that we're starting async 186 ASSERT_TRUE(request_->is_pending()); // verify that we're starting async
187 if (run_to_completion) 187 if (run_to_completion)
188 base::MessageLoop::current()->Run(); 188 base::RunLoop().Run();
189 } 189 }
190 190
191 void TestRequest(const GURL& url) { 191 void TestRequest(const GURL& url) {
192 TestRequestHelper(url, true, file_system_context_.get()); 192 TestRequestHelper(url, true, file_system_context_.get());
193 } 193 }
194 194
195 void TestRequestWithContext(const GURL& url, 195 void TestRequestWithContext(const GURL& url,
196 FileSystemContext* file_system_context) { 196 FileSystemContext* file_system_context) {
197 TestRequestHelper(url, true, file_system_context); 197 TestRequestHelper(url, true, file_system_context);
198 } 198 }
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 ASSERT_FALSE(request_->status().is_success()); 455 ASSERT_FALSE(request_->status().is_success());
456 EXPECT_EQ(net::ERR_FILE_NOT_FOUND, request_->status().error()); 456 EXPECT_EQ(net::ERR_FILE_NOT_FOUND, request_->status().error());
457 457
458 ASSERT_FALSE( 458 ASSERT_FALSE(
459 storage::ExternalMountPoints::GetSystemInstance()->RevokeFileSystem( 459 storage::ExternalMountPoints::GetSystemInstance()->RevokeFileSystem(
460 kValidExternalMountPoint)); 460 kValidExternalMountPoint));
461 } 461 }
462 462
463 } // namespace 463 } // namespace
464 } // namespace content 464 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698