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

Side by Side Diff: chrome/browser/sync_file_system/drive_backend/drive_file_sync_service_fake_unittest.cc

Issue 19579005: Move ReadFileToString to the base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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 | Annotate | Revision Log
OLDNEW
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/drive_file_sync_service. h" 5 #include "chrome/browser/sync_file_system/drive_backend/drive_file_sync_service. h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 795 matching lines...) Expand 10 before | Expand all | Expand 10 after
806 status = SYNC_STATUS_FAILED; 806 status = SYNC_STATUS_FAILED;
807 webkit_blob::ScopedFile downloaded; 807 webkit_blob::ScopedFile downloaded;
808 sync_service_->DownloadRemoteVersion( 808 sync_service_->DownloadRemoteVersion(
809 url, versions[0].id, 809 url, versions[0].id,
810 base::Bind(&DidDownloadRemoteVersion, &status, &downloaded)); 810 base::Bind(&DidDownloadRemoteVersion, &status, &downloaded));
811 base::RunLoop().RunUntilIdle(); 811 base::RunLoop().RunUntilIdle();
812 812
813 ASSERT_EQ(SYNC_STATUS_OK, status); 813 ASSERT_EQ(SYNC_STATUS_OK, status);
814 814
815 std::string downloaded_content; 815 std::string downloaded_content;
816 EXPECT_TRUE(file_util::ReadFileToString(downloaded.path(), 816 EXPECT_TRUE(base::ReadFileToString(downloaded.path(), &downloaded_content));
817 &downloaded_content));
818 EXPECT_EQ(content, downloaded_content); 817 EXPECT_EQ(content, downloaded_content);
819 } 818 }
820 819
821 TEST_F(DriveFileSyncServiceFakeTest, RegisterNewOrigin) { 820 TEST_F(DriveFileSyncServiceFakeTest, RegisterNewOrigin) {
822 ASSERT_FALSE(IsDriveAPIDisabled()); 821 ASSERT_FALSE(IsDriveAPIDisabled());
823 TestRegisterNewOrigin(); 822 TestRegisterNewOrigin();
824 } 823 }
825 824
826 TEST_F(DriveFileSyncServiceFakeTest, RegisterNewOrigin_WAPI) { 825 TEST_F(DriveFileSyncServiceFakeTest, RegisterNewOrigin_WAPI) {
827 ScopedDisableDriveAPI disable_drive_api; 826 ScopedDisableDriveAPI disable_drive_api;
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
934 } 933 }
935 934
936 TEST_F(DriveFileSyncServiceFakeTest, GetRemoteVersions_WAPI) { 935 TEST_F(DriveFileSyncServiceFakeTest, GetRemoteVersions_WAPI) {
937 ScopedDisableDriveAPI disable_drive_api; 936 ScopedDisableDriveAPI disable_drive_api;
938 TestGetRemoteVersions(); 937 TestGetRemoteVersions();
939 } 938 }
940 939
941 #endif // !defined(OS_ANDROID) 940 #endif // !defined(OS_ANDROID)
942 941
943 } // namespace sync_file_system 942 } // namespace sync_file_system
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698