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/sync/entry_revert_performer.h" | 5 #include "chrome/browser/chromeos/drive/sync/entry_revert_performer.h" |
6 | 6 |
7 #include "base/task_runner_util.h" | 7 #include "base/task_runner_util.h" |
8 #include "chrome/browser/chromeos/drive/file_change.h" | 8 #include "chrome/browser/chromeos/drive/file_change.h" |
9 #include "chrome/browser/chromeos/drive/file_system/operation_test_base.h" | 9 #include "chrome/browser/chromeos/drive/file_system/operation_test_base.h" |
10 #include "chrome/browser/chromeos/drive/file_system_util.h" | 10 #include "chrome/browser/chromeos/drive/file_system_util.h" |
11 #include "chrome/browser/chromeos/drive/job_scheduler.h" | 11 #include "chrome/browser/chromeos/drive/job_scheduler.h" |
12 #include "chrome/browser/chromeos/drive/resource_metadata.h" | 12 #include "chrome/browser/chromeos/drive/resource_metadata.h" |
13 #include "chrome/browser/drive/fake_drive_service.h" | 13 #include "chrome/browser/drive/fake_drive_service.h" |
14 #include "content/public/test/test_utils.h" | 14 #include "content/public/test/test_utils.h" |
15 #include "google_apis/drive/test_util.h" | 15 #include "google_apis/drive/test_util.h" |
16 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
17 | 17 |
18 namespace drive { | 18 namespace drive { |
19 namespace internal { | 19 namespace internal { |
20 | 20 |
21 class EntryRevertPerformerTest : public file_system::OperationTestBase { | 21 class EntryRevertPerformerTest : public file_system::OperationTestBase { |
22 protected: | 22 protected: |
23 virtual void SetUp() override { | 23 void SetUp() override { |
24 OperationTestBase::SetUp(); | 24 OperationTestBase::SetUp(); |
25 performer_.reset(new EntryRevertPerformer(blocking_task_runner(), | 25 performer_.reset(new EntryRevertPerformer(blocking_task_runner(), |
26 delegate(), | 26 delegate(), |
27 scheduler(), | 27 scheduler(), |
28 metadata())); | 28 metadata())); |
29 } | 29 } |
30 | 30 |
31 scoped_ptr<EntryRevertPerformer> performer_; | 31 scoped_ptr<EntryRevertPerformer> performer_; |
32 }; | 32 }; |
33 | 33 |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 // Verify the entry was deleted locally. | 142 // Verify the entry was deleted locally. |
143 EXPECT_EQ(FILE_ERROR_NOT_FOUND, | 143 EXPECT_EQ(FILE_ERROR_NOT_FOUND, |
144 GetLocalResourceEntryById(entry.local_id(), &entry)); | 144 GetLocalResourceEntryById(entry.local_id(), &entry)); |
145 | 145 |
146 EXPECT_EQ(1U, delegate()->get_changed_files().size()); | 146 EXPECT_EQ(1U, delegate()->get_changed_files().size()); |
147 EXPECT_TRUE(delegate()->get_changed_files().count(path)); | 147 EXPECT_TRUE(delegate()->get_changed_files().count(path)); |
148 } | 148 } |
149 | 149 |
150 } // namespace internal | 150 } // namespace internal |
151 } // namespace drive | 151 } // namespace drive |
OLD | NEW |