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/file_system.h" | 5 #include "chrome/browser/chromeos/drive/file_system.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 840 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
851 } | 851 } |
852 | 852 |
853 TEST_F(FileSystemTest, GetAvailableSpace) { | 853 TEST_F(FileSystemTest, GetAvailableSpace) { |
854 FileError error = FILE_ERROR_OK; | 854 FileError error = FILE_ERROR_OK; |
855 int64 bytes_total; | 855 int64 bytes_total; |
856 int64 bytes_used; | 856 int64 bytes_used; |
857 file_system_->GetAvailableSpace( | 857 file_system_->GetAvailableSpace( |
858 google_apis::test_util::CreateCopyResultCallback( | 858 google_apis::test_util::CreateCopyResultCallback( |
859 &error, &bytes_total, &bytes_used)); | 859 &error, &bytes_total, &bytes_used)); |
860 test_util::RunBlockingPoolTask(); | 860 test_util::RunBlockingPoolTask(); |
861 EXPECT_EQ(6789012345LL, bytes_used); | 861 EXPECT_EQ(GG_LONGLONG(6789012345), bytes_used); |
862 EXPECT_EQ(9876543210LL, bytes_total); | 862 EXPECT_EQ(GG_LONGLONG(9876543210), bytes_total); |
863 } | 863 } |
864 | 864 |
865 TEST_F(FileSystemTest, MarkCacheFileAsMountedAndUnmounted) { | 865 TEST_F(FileSystemTest, MarkCacheFileAsMountedAndUnmounted) { |
866 ASSERT_TRUE(LoadFullResourceList()); | 866 ASSERT_TRUE(LoadFullResourceList()); |
867 | 867 |
868 base::FilePath file_in_root(FILE_PATH_LITERAL("drive/root/File 1.txt")); | 868 base::FilePath file_in_root(FILE_PATH_LITERAL("drive/root/File 1.txt")); |
869 scoped_ptr<ResourceEntry> entry(GetResourceEntrySync(file_in_root)); | 869 scoped_ptr<ResourceEntry> entry(GetResourceEntrySync(file_in_root)); |
870 ASSERT_TRUE(entry); | 870 ASSERT_TRUE(entry); |
871 | 871 |
872 // Write to cache. | 872 // Write to cache. |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
936 kEmbedOrigin, | 936 kEmbedOrigin, |
937 google_apis::test_util::CreateCopyResultCallback(&error, &share_url)); | 937 google_apis::test_util::CreateCopyResultCallback(&error, &share_url)); |
938 test_util::RunBlockingPoolTask(); | 938 test_util::RunBlockingPoolTask(); |
939 | 939 |
940 // Verify the error and the share url, which should be empty. | 940 // Verify the error and the share url, which should be empty. |
941 EXPECT_EQ(FILE_ERROR_FAILED, error); | 941 EXPECT_EQ(FILE_ERROR_FAILED, error); |
942 EXPECT_TRUE(share_url.is_empty()); | 942 EXPECT_TRUE(share_url.is_empty()); |
943 } | 943 } |
944 | 944 |
945 } // namespace drive | 945 } // namespace drive |
OLD | NEW |