| OLD | NEW |
| 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/fileapi_worker.h" | 5 #include "chrome/browser/chromeos/drive/fileapi_worker.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/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "chrome/browser/chromeos/drive/dummy_file_system.h" | 11 #include "chrome/browser/chromeos/drive/dummy_file_system.h" |
| 12 #include "chrome/browser/chromeos/drive/test_util.h" | 12 #include "chrome/browser/chromeos/drive/test_util.h" |
| 13 #include "chrome/browser/google_apis/test_util.h" | |
| 14 #include "content/public/test/test_browser_thread_bundle.h" | 13 #include "content/public/test/test_browser_thread_bundle.h" |
| 14 #include "google_apis/drive/test_util.h" |
| 15 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
| 16 | 16 |
| 17 namespace drive { | 17 namespace drive { |
| 18 namespace fileapi_internal { | 18 namespace fileapi_internal { |
| 19 namespace { | 19 namespace { |
| 20 | 20 |
| 21 // Increments |num_called| for checking how many times the closure is called. | 21 // Increments |num_called| for checking how many times the closure is called. |
| 22 void Increment(int* num_called) { | 22 void Increment(int* num_called) { |
| 23 ++*num_called; | 23 ++*num_called; |
| 24 } | 24 } |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 264 OpenFile(kDummyPath, | 264 OpenFile(kDummyPath, |
| 265 base::PLATFORM_FILE_OPEN | base::PLATFORM_FILE_READ, | 265 base::PLATFORM_FILE_OPEN | base::PLATFORM_FILE_READ, |
| 266 base::Bind(&VerifyRead, kInitialData), | 266 base::Bind(&VerifyRead, kInitialData), |
| 267 &file_system); | 267 &file_system); |
| 268 test_util::RunBlockingPoolTask(); | 268 test_util::RunBlockingPoolTask(); |
| 269 EXPECT_TRUE(file_system.closed()); | 269 EXPECT_TRUE(file_system.closed()); |
| 270 } | 270 } |
| 271 | 271 |
| 272 } // namespace fileapi_internal | 272 } // namespace fileapi_internal |
| 273 } // namespace drive | 273 } // namespace drive |
| OLD | NEW |