Chromium Code Reviews| 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 void SetUp() override { ASSERT_TRUE(testing_profile_manager_.SetUp()); } |
|
hashimoto
2015/01/21 04:50:12
nit: I think ASSERT_TRUE should be better placed i
| |
| 43 ASSERT_TRUE(testing_profile_manager_.SetUp()); | |
| 44 } | |
| 45 | 43 |
| 46 TestingProfileManager& testing_profile_manager() { | 44 TestingProfileManager& testing_profile_manager() { |
| 47 return testing_profile_manager_; | 45 return testing_profile_manager_; |
| 48 } | 46 } |
| 49 | 47 |
| 50 private: | 48 private: |
| 51 content::TestBrowserThreadBundle thread_bundle_; | 49 content::TestBrowserThreadBundle thread_bundle_; |
| 52 TestingProfileManager testing_profile_manager_; | 50 TestingProfileManager testing_profile_manager_; |
| 53 }; | 51 }; |
| 54 | 52 |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 263 // Non GDoc file. | 261 // Non GDoc file. |
| 264 file = temp_dir.path().AppendASCII("test.txt"); | 262 file = temp_dir.path().AppendASCII("test.txt"); |
| 265 std::string data = "Hello world!"; | 263 std::string data = "Hello world!"; |
| 266 EXPECT_TRUE(google_apis::test_util::WriteStringToFile(file, data)); | 264 EXPECT_TRUE(google_apis::test_util::WriteStringToFile(file, data)); |
| 267 EXPECT_TRUE(ReadUrlFromGDocFile(file).is_empty()); | 265 EXPECT_TRUE(ReadUrlFromGDocFile(file).is_empty()); |
| 268 EXPECT_TRUE(ReadResourceIdFromGDocFile(file).empty()); | 266 EXPECT_TRUE(ReadResourceIdFromGDocFile(file).empty()); |
| 269 } | 267 } |
| 270 | 268 |
| 271 } // namespace util | 269 } // namespace util |
| 272 } // namespace drive | 270 } // namespace drive |
| OLD | NEW |