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

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

Issue 1190203002: Move (most of) chrome/browser/drive into components/drive/service. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebasing... Created 5 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 (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/files/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/single_thread_task_runner.h" 14 #include "base/single_thread_task_runner.h"
15 #include "base/stl_util.h" 15 #include "base/stl_util.h"
16 #include "base/strings/stringprintf.h" 16 #include "base/strings/stringprintf.h"
17 #include "base/thread_task_runner_handle.h" 17 #include "base/thread_task_runner_handle.h"
18 #include "chrome/browser/chromeos/drive/drive_pref_names.h" 18 #include "chrome/browser/chromeos/drive/drive_pref_names.h"
19 #include "chrome/browser/chromeos/drive/drive_test_util.h" 19 #include "chrome/browser/chromeos/drive/drive_test_util.h"
20 #include "chrome/browser/drive/event_logger.h" 20 #include "components/drive/event_logger.h"
21 #include "chrome/browser/drive/fake_drive_service.h" 21 #include "components/drive/service/fake_drive_service.h"
22 #include "chrome/browser/drive/test_util.h" 22 #include "components/drive/service/test_util.h"
23 #include "content/public/test/test_browser_thread_bundle.h" 23 #include "content/public/test/test_browser_thread_bundle.h"
24 #include "google_apis/drive/drive_api_parser.h" 24 #include "google_apis/drive/drive_api_parser.h"
25 #include "google_apis/drive/test_util.h" 25 #include "google_apis/drive/test_util.h"
26 #include "testing/gtest/include/gtest/gtest.h" 26 #include "testing/gtest/include/gtest/gtest.h"
27 27
28 namespace drive { 28 namespace drive {
29 29
30 namespace { 30 namespace {
31 31
32 // Dummy value passed for the |expected_file_size| parameter of DownloadFile(). 32 // Dummy value passed for the |expected_file_size| parameter of DownloadFile().
(...skipping 996 matching lines...) Expand 10 before | Expand all | Expand 10 after
1029 scheduler_->CancelJob(first_job_id); 1029 scheduler_->CancelJob(first_job_id);
1030 1030
1031 // Only the first job should be cancelled. 1031 // Only the first job should be cancelled.
1032 base::RunLoop().RunUntilIdle(); 1032 base::RunLoop().RunUntilIdle();
1033 EXPECT_EQ(google_apis::DRIVE_CANCELLED, error1); 1033 EXPECT_EQ(google_apis::DRIVE_CANCELLED, error1);
1034 EXPECT_EQ(google_apis::HTTP_SUCCESS, error2); 1034 EXPECT_EQ(google_apis::HTTP_SUCCESS, error2);
1035 EXPECT_TRUE(scheduler_->GetJobInfoList().empty()); 1035 EXPECT_TRUE(scheduler_->GetJobInfoList().empty());
1036 } 1036 }
1037 1037
1038 } // namespace drive 1038 } // namespace drive
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/drive/job_scheduler.cc ('k') | chrome/browser/chromeos/drive/resource_entry_conversion.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698