OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "components/drive/file_system_core_util.h" | 5 #include "components/drive/file_system_core_util.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
11 #include "base/files/scoped_temp_dir.h" | 11 #include "base/files/scoped_temp_dir.h" |
12 #include "base/single_thread_task_runner.h" | 12 #include "base/single_thread_task_runner.h" |
13 #include "base/strings/utf_string_conversions.h" | 13 #include "base/strings/utf_string_conversions.h" |
14 #include "base/thread_task_runner_handle.h" | 14 #include "base/threading/thread_task_runner_handle.h" |
15 #include "content/public/test/test_browser_thread_bundle.h" | 15 #include "content/public/test/test_browser_thread_bundle.h" |
16 #include "google_apis/drive/test_util.h" | 16 #include "google_apis/drive/test_util.h" |
17 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
18 | 18 |
19 namespace drive { | 19 namespace drive { |
20 namespace util { | 20 namespace util { |
21 | 21 |
22 class FileSystemUtilTest : public testing::Test { | 22 class FileSystemUtilTest : public testing::Test { |
23 content::TestBrowserThreadBundle thread_bundle_; | 23 content::TestBrowserThreadBundle thread_bundle_; |
24 }; | 24 }; |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 // Non GDoc file. | 90 // Non GDoc file. |
91 file = temp_dir.path().AppendASCII("test.txt"); | 91 file = temp_dir.path().AppendASCII("test.txt"); |
92 std::string data = "Hello world!"; | 92 std::string data = "Hello world!"; |
93 EXPECT_TRUE(google_apis::test_util::WriteStringToFile(file, data)); | 93 EXPECT_TRUE(google_apis::test_util::WriteStringToFile(file, data)); |
94 EXPECT_TRUE(ReadUrlFromGDocFile(file).is_empty()); | 94 EXPECT_TRUE(ReadUrlFromGDocFile(file).is_empty()); |
95 EXPECT_TRUE(ReadResourceIdFromGDocFile(file).empty()); | 95 EXPECT_TRUE(ReadResourceIdFromGDocFile(file).empty()); |
96 } | 96 } |
97 | 97 |
98 } // namespace util | 98 } // namespace util |
99 } // namespace drive | 99 } // namespace drive |
OLD | NEW |