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

Side by Side Diff: chrome/browser/chromeos/drive/webkit_file_stream_reader_impl_unittest.cc

Issue 14113053: chrome: Use base::MessageLoop. (Part 3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase again Created 7 years, 6 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 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 "chrome/browser/chromeos/drive/webkit_file_stream_reader_impl.h" 5 #include "chrome/browser/chromeos/drive/webkit_file_stream_reader_impl.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 89
90 FileSystemInterface* GetFileSystem() { 90 FileSystemInterface* GetFileSystem() {
91 return fake_file_system_.get(); 91 return fake_file_system_.get();
92 } 92 }
93 93
94 DriveFileStreamReader::FileSystemGetter GetFileSystemGetter() { 94 DriveFileStreamReader::FileSystemGetter GetFileSystemGetter() {
95 return base::Bind(&WebkitFileStreamReaderImplTest::GetFileSystem, 95 return base::Bind(&WebkitFileStreamReaderImplTest::GetFileSystem,
96 base::Unretained(this)); 96 base::Unretained(this));
97 } 97 }
98 98
99 MessageLoopForIO message_loop_; 99 base::MessageLoopForIO message_loop_;
100 content::TestBrowserThread ui_thread_; 100 content::TestBrowserThread ui_thread_;
101 content::TestBrowserThread io_thread_; 101 content::TestBrowserThread io_thread_;
102 102
103 scoped_ptr<base::Thread> worker_thread_; 103 scoped_ptr<base::Thread> worker_thread_;
104 104
105 scoped_ptr<google_apis::FakeDriveService> fake_drive_service_; 105 scoped_ptr<google_apis::FakeDriveService> fake_drive_service_;
106 scoped_ptr<test_util::FakeFileSystem> fake_file_system_; 106 scoped_ptr<test_util::FakeFileSystem> fake_file_system_;
107 }; 107 };
108 108
109 TEST_F(WebkitFileStreamReaderImplTest, ReadThenGetLength) { 109 TEST_F(WebkitFileStreamReaderImplTest, ReadThenGetLength) {
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 base::Time::FromInternalValue(1))); 245 base::Time::FromInternalValue(1)));
246 246
247 net::TestInt64CompletionCallback callback; 247 net::TestInt64CompletionCallback callback;
248 int64 result = reader->GetLength(callback.callback()); 248 int64 result = reader->GetLength(callback.callback());
249 result = callback.GetResult(result); 249 result = callback.GetResult(result);
250 EXPECT_EQ(net::ERR_UPLOAD_FILE_CHANGED, result); 250 EXPECT_EQ(net::ERR_UPLOAD_FILE_CHANGED, result);
251 } 251 }
252 252
253 } // namespace internal 253 } // namespace internal
254 } // namespace drive 254 } // namespace drive
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698