OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 <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" |
(...skipping 21 matching lines...) Expand all Loading... |
32 | 32 |
33 // Sets up ProfileManager for testing and marks the current thread as UI by | 33 // Sets up ProfileManager for testing and marks the current thread as UI by |
34 // TestBrowserThreadBundle. We need the thread since Profile objects must be | 34 // TestBrowserThreadBundle. We need the thread since Profile objects must be |
35 // touched from UI and hence has CHECK/DCHECKs for it. | 35 // touched from UI and hence has CHECK/DCHECKs for it. |
36 class ProfileRelatedFileSystemUtilTest : public testing::Test { | 36 class ProfileRelatedFileSystemUtilTest : public testing::Test { |
37 protected: | 37 protected: |
38 ProfileRelatedFileSystemUtilTest() | 38 ProfileRelatedFileSystemUtilTest() |
39 : testing_profile_manager_(TestingBrowserProcess::GetGlobal()) { | 39 : testing_profile_manager_(TestingBrowserProcess::GetGlobal()) { |
40 } | 40 } |
41 | 41 |
42 virtual void SetUp() OVERRIDE { | 42 virtual void SetUp() override { |
43 ASSERT_TRUE(testing_profile_manager_.SetUp()); | 43 ASSERT_TRUE(testing_profile_manager_.SetUp()); |
44 } | 44 } |
45 | 45 |
46 TestingProfileManager& testing_profile_manager() { | 46 TestingProfileManager& testing_profile_manager() { |
47 return testing_profile_manager_; | 47 return testing_profile_manager_; |
48 } | 48 } |
49 | 49 |
50 private: | 50 private: |
51 content::TestBrowserThreadBundle thread_bundle_; | 51 content::TestBrowserThreadBundle thread_bundle_; |
52 TestingProfileManager testing_profile_manager_; | 52 TestingProfileManager testing_profile_manager_; |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 // Non GDoc file. | 263 // Non GDoc file. |
264 file = temp_dir.path().AppendASCII("test.txt"); | 264 file = temp_dir.path().AppendASCII("test.txt"); |
265 std::string data = "Hello world!"; | 265 std::string data = "Hello world!"; |
266 EXPECT_TRUE(google_apis::test_util::WriteStringToFile(file, data)); | 266 EXPECT_TRUE(google_apis::test_util::WriteStringToFile(file, data)); |
267 EXPECT_TRUE(ReadUrlFromGDocFile(file).is_empty()); | 267 EXPECT_TRUE(ReadUrlFromGDocFile(file).is_empty()); |
268 EXPECT_TRUE(ReadResourceIdFromGDocFile(file).empty()); | 268 EXPECT_TRUE(ReadResourceIdFromGDocFile(file).empty()); |
269 } | 269 } |
270 | 270 |
271 } // namespace util | 271 } // namespace util |
272 } // namespace drive | 272 } // namespace drive |
OLD | NEW |