OLD | NEW |
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 "chrome/browser/chromeos/drive/job_scheduler.h" | 5 #include "chrome/browser/chromeos/drive/job_scheduler.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
11 #include "base/files/scoped_temp_dir.h" | 11 #include "base/files/scoped_temp_dir.h" |
12 #include "base/prefs/testing_pref_service.h" | 12 #include "base/prefs/testing_pref_service.h" |
13 #include "base/run_loop.h" | 13 #include "base/run_loop.h" |
14 #include "base/stl_util.h" | 14 #include "base/stl_util.h" |
15 #include "base/strings/stringprintf.h" | 15 #include "base/strings/stringprintf.h" |
16 #include "chrome/browser/chromeos/drive/test_util.h" | 16 #include "chrome/browser/chromeos/drive/test_util.h" |
17 #include "chrome/browser/drive/fake_drive_service.h" | 17 #include "chrome/browser/drive/fake_drive_service.h" |
18 #include "chrome/browser/google_apis/drive_api_parser.h" | |
19 #include "chrome/browser/google_apis/gdata_wapi_parser.h" | |
20 #include "chrome/browser/google_apis/test_util.h" | |
21 #include "chrome/common/pref_names.h" | 18 #include "chrome/common/pref_names.h" |
22 #include "content/public/test/test_browser_thread_bundle.h" | 19 #include "content/public/test/test_browser_thread_bundle.h" |
| 20 #include "google_apis/drive/drive_api_parser.h" |
| 21 #include "google_apis/drive/gdata_wapi_parser.h" |
| 22 #include "google_apis/drive/test_util.h" |
23 #include "testing/gtest/include/gtest/gtest.h" | 23 #include "testing/gtest/include/gtest/gtest.h" |
24 | 24 |
25 namespace drive { | 25 namespace drive { |
26 | 26 |
27 namespace { | 27 namespace { |
28 | 28 |
29 // Dummy value passed for the |expected_file_size| parameter of DownloadFile(). | 29 // Dummy value passed for the |expected_file_size| parameter of DownloadFile(). |
30 const int64 kDummyDownloadFileSize = 0; | 30 const int64 kDummyDownloadFileSize = 0; |
31 | 31 |
32 void CopyTitleFromGetResourceEntryCallback( | 32 void CopyTitleFromGetResourceEntryCallback( |
(...skipping 1053 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1086 scheduler_->CancelJob(first_job_id); | 1086 scheduler_->CancelJob(first_job_id); |
1087 | 1087 |
1088 // Only the first job should be cancelled. | 1088 // Only the first job should be cancelled. |
1089 base::RunLoop().RunUntilIdle(); | 1089 base::RunLoop().RunUntilIdle(); |
1090 EXPECT_EQ(google_apis::GDATA_CANCELLED, error1); | 1090 EXPECT_EQ(google_apis::GDATA_CANCELLED, error1); |
1091 EXPECT_EQ(google_apis::HTTP_SUCCESS, error2); | 1091 EXPECT_EQ(google_apis::HTTP_SUCCESS, error2); |
1092 EXPECT_TRUE(scheduler_->GetJobInfoList().empty()); | 1092 EXPECT_TRUE(scheduler_->GetJobInfoList().empty()); |
1093 } | 1093 } |
1094 | 1094 |
1095 } // namespace drive | 1095 } // namespace drive |
OLD | NEW |