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/sync_file_system/drive_backend_v1/fake_api_util.h" | 5 #include "chrome/browser/sync_file_system/drive_backend_v1/fake_api_util.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
11 #include "base/message_loop/message_loop.h" | 11 #include "base/message_loop/message_loop.h" |
12 #include "chrome/browser/google_apis/gdata_errorcode.h" | 12 #include "google_apis/drive/gdata_errorcode.h" |
13 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
14 #include "webkit/common/blob/scoped_file.h" | 14 #include "webkit/common/blob/scoped_file.h" |
15 | 15 |
16 namespace sync_file_system { | 16 namespace sync_file_system { |
17 namespace drive_backend { | 17 namespace drive_backend { |
18 | 18 |
19 namespace { | 19 namespace { |
20 | 20 |
21 void DidDownloadFile(google_apis::GDataErrorCode* error_out, | 21 void DidDownloadFile(google_apis::GDataErrorCode* error_out, |
22 std::string* file_md5_out, | 22 std::string* file_md5_out, |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 api_util.DeleteFile( | 132 api_util.DeleteFile( |
133 resource_id, std::string(), base::Bind(&DidDeleteFile, &error)); | 133 resource_id, std::string(), base::Bind(&DidDeleteFile, &error)); |
134 message_loop.RunUntilIdle(); | 134 message_loop.RunUntilIdle(); |
135 | 135 |
136 EXPECT_EQ(google_apis::HTTP_SUCCESS, error); | 136 EXPECT_EQ(google_apis::HTTP_SUCCESS, error); |
137 EXPECT_TRUE(api_util.remote_resources().find(resource_id)->second.deleted); | 137 EXPECT_TRUE(api_util.remote_resources().find(resource_id)->second.deleted); |
138 } | 138 } |
139 | 139 |
140 } // namespace drive_backend | 140 } // namespace drive_backend |
141 } // namespace sync_file_system | 141 } // namespace sync_file_system |
OLD | NEW |