| 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_util.h" | 5 #include "chrome/browser/chromeos/drive/file_system_util.h" |
| 6 | 6 |
| 7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
| 8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
| 9 #include "base/files/scoped_temp_dir.h" | 9 #include "base/files/scoped_temp_dir.h" |
| 10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| 11 #include "base/strings/utf_string_conversions.h" | 11 #include "base/strings/utf_string_conversions.h" |
| 12 #include "chrome/browser/google_apis/test_util.h" | |
| 13 #include "chrome/test/base/testing_profile.h" | 12 #include "chrome/test/base/testing_profile.h" |
| 14 #include "content/public/test/test_file_system_options.h" | 13 #include "content/public/test/test_file_system_options.h" |
| 14 #include "google_apis/drive/test_util.h" |
| 15 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
| 16 #include "webkit/browser/fileapi/external_mount_points.h" | 16 #include "webkit/browser/fileapi/external_mount_points.h" |
| 17 #include "webkit/browser/fileapi/file_system_backend.h" | 17 #include "webkit/browser/fileapi/file_system_backend.h" |
| 18 #include "webkit/browser/fileapi/file_system_context.h" | 18 #include "webkit/browser/fileapi/file_system_context.h" |
| 19 #include "webkit/browser/fileapi/file_system_url.h" | 19 #include "webkit/browser/fileapi/file_system_url.h" |
| 20 #include "webkit/browser/fileapi/isolated_context.h" | 20 #include "webkit/browser/fileapi/isolated_context.h" |
| 21 | 21 |
| 22 namespace drive { | 22 namespace drive { |
| 23 namespace util { | 23 namespace util { |
| 24 | 24 |
| (...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 295 file = temp_dir.path().AppendASCII("test.txt"); | 295 file = temp_dir.path().AppendASCII("test.txt"); |
| 296 std::string data = "Hello world!"; | 296 std::string data = "Hello world!"; |
| 297 EXPECT_TRUE(google_apis::test_util::WriteStringToFile(file, data)); | 297 EXPECT_TRUE(google_apis::test_util::WriteStringToFile(file, data)); |
| 298 EXPECT_FALSE(HasGDocFileExtension(file)); | 298 EXPECT_FALSE(HasGDocFileExtension(file)); |
| 299 EXPECT_TRUE(ReadUrlFromGDocFile(file).is_empty()); | 299 EXPECT_TRUE(ReadUrlFromGDocFile(file).is_empty()); |
| 300 EXPECT_TRUE(ReadResourceIdFromGDocFile(file).empty()); | 300 EXPECT_TRUE(ReadResourceIdFromGDocFile(file).empty()); |
| 301 } | 301 } |
| 302 | 302 |
| 303 } // namespace util | 303 } // namespace util |
| 304 } // namespace drive | 304 } // namespace drive |
| OLD | NEW |