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 "apps/saved_files_service.h" | 5 #include "apps/saved_files_service.h" |
6 #include "base/file_util.h" | 6 #include "base/file_util.h" |
7 #include "base/path_service.h" | 7 #include "base/path_service.h" |
8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
9 #include "chrome/browser/apps/app_browsertest_util.h" | 9 #include "chrome/browser/apps/app_browsertest_util.h" |
10 #include "chrome/browser/chrome_notification_types.h" | 10 #include "chrome/browser/chrome_notification_types.h" |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 ASSERT_TRUE(RunPlatformAppTest( | 171 ASSERT_TRUE(RunPlatformAppTest( |
172 "api_test/file_system/get_display_path_prettify")) << message_; | 172 "api_test/file_system/get_display_path_prettify")) << message_; |
173 } | 173 } |
174 #endif | 174 #endif |
175 | 175 |
176 #if defined(OS_MACOSX) | 176 #if defined(OS_MACOSX) |
177 IN_PROC_BROWSER_TEST_F(FileSystemApiTest, | 177 IN_PROC_BROWSER_TEST_F(FileSystemApiTest, |
178 FileSystemApiGetDisplayPathPrettifyMac) { | 178 FileSystemApiGetDisplayPathPrettifyMac) { |
179 // On Mac, "test.localized" will be localized into just "test". | 179 // On Mac, "test.localized" will be localized into just "test". |
180 base::FilePath test_path = TempFilePath("test.localized", false); | 180 base::FilePath test_path = TempFilePath("test.localized", false); |
181 ASSERT_TRUE(file_util::CreateDirectory(test_path)); | 181 ASSERT_TRUE(base::CreateDirectory(test_path)); |
182 | 182 |
183 base::FilePath test_file = test_path.AppendASCII("gold.txt"); | 183 base::FilePath test_file = test_path.AppendASCII("gold.txt"); |
184 base::FilePath source = test_root_folder_.AppendASCII("gold.txt"); | 184 base::FilePath source = test_root_folder_.AppendASCII("gold.txt"); |
185 EXPECT_TRUE(base::CopyFile(source, test_file)); | 185 EXPECT_TRUE(base::CopyFile(source, test_file)); |
186 | 186 |
187 FileSystemChooseEntryFunction::SkipPickerAndAlwaysSelectPathForTest( | 187 FileSystemChooseEntryFunction::SkipPickerAndAlwaysSelectPathForTest( |
188 &test_file); | 188 &test_file); |
189 ASSERT_TRUE(RunPlatformAppTest( | 189 ASSERT_TRUE(RunPlatformAppTest( |
190 "api_test/file_system/get_display_path_prettify_mac")) << message_; | 190 "api_test/file_system/get_display_path_prettify_mac")) << message_; |
191 } | 191 } |
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
627 AppInstallObserver observer( | 627 AppInstallObserver observer( |
628 base::Bind(AddSavedEntry, | 628 base::Bind(AddSavedEntry, |
629 test_directory, | 629 test_directory, |
630 true, | 630 true, |
631 apps::SavedFilesService::Get(profile()))); | 631 apps::SavedFilesService::Get(profile()))); |
632 ASSERT_TRUE(RunPlatformAppTest("api_test/file_system/restore_directory")) | 632 ASSERT_TRUE(RunPlatformAppTest("api_test/file_system/restore_directory")) |
633 << message_; | 633 << message_; |
634 } | 634 } |
635 | 635 |
636 } // namespace extensions | 636 } // namespace extensions |
OLD | NEW |