| 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/files/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/event_logger.h" | 17 #include "chrome/browser/drive/event_logger.h" |
| 18 #include "chrome/browser/drive/fake_drive_service.h" | 18 #include "chrome/browser/drive/fake_drive_service.h" |
| 19 #include "chrome/browser/drive/test_util.h" | 19 #include "chrome/browser/drive/test_util.h" |
| 20 #include "chrome/common/pref_names.h" | 20 #include "chrome/common/pref_names.h" |
| (...skipping 1030 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1051 scheduler_->CancelJob(first_job_id); | 1051 scheduler_->CancelJob(first_job_id); |
| 1052 | 1052 |
| 1053 // Only the first job should be cancelled. | 1053 // Only the first job should be cancelled. |
| 1054 base::RunLoop().RunUntilIdle(); | 1054 base::RunLoop().RunUntilIdle(); |
| 1055 EXPECT_EQ(google_apis::GDATA_CANCELLED, error1); | 1055 EXPECT_EQ(google_apis::GDATA_CANCELLED, error1); |
| 1056 EXPECT_EQ(google_apis::HTTP_SUCCESS, error2); | 1056 EXPECT_EQ(google_apis::HTTP_SUCCESS, error2); |
| 1057 EXPECT_TRUE(scheduler_->GetJobInfoList().empty()); | 1057 EXPECT_TRUE(scheduler_->GetJobInfoList().empty()); |
| 1058 } | 1058 } |
| 1059 | 1059 |
| 1060 } // namespace drive | 1060 } // namespace drive |
| OLD | NEW |