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 "base/file_util.h" | 5 #include "base/file_util.h" |
6 #include "base/path_service.h" | 6 #include "base/path_service.h" |
7 #include "chrome/browser/extensions/api/file_system/file_system_api.h" | 7 #include "chrome/browser/extensions/api/file_system/file_system_api.h" |
8 #include "chrome/browser/extensions/platform_app_browsertest_util.h" | 8 #include "chrome/browser/extensions/platform_app_browsertest_util.h" |
9 | 9 |
| 10 #if defined(OS_WIN) |
| 11 #include "base/base_paths_win.h" |
| 12 #elif defined(OS_POSIX) |
| 13 #include "base/base_paths_posix.h" |
| 14 #endif |
| 15 |
10 using extensions::FileSystemChooseFileFunction; | 16 using extensions::FileSystemChooseFileFunction; |
11 | 17 |
12 class FileSystemApiTest : public extensions::PlatformAppBrowserTest { | 18 class FileSystemApiTest : public extensions::PlatformAppBrowserTest { |
13 public: | 19 public: |
14 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { | 20 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { |
15 extensions::PlatformAppBrowserTest::SetUpCommandLine(command_line); | 21 extensions::PlatformAppBrowserTest::SetUpCommandLine(command_line); |
16 test_root_folder_ = test_data_dir_.AppendASCII("api_test") | 22 test_root_folder_ = test_data_dir_.AppendASCII("api_test") |
17 .AppendASCII("file_system"); | 23 .AppendASCII("file_system"); |
18 } | 24 } |
19 | 25 |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 } | 201 } |
196 | 202 |
197 IN_PROC_BROWSER_TEST_F(FileSystemApiTest, FileSystemApiIsWritableTest) { | 203 IN_PROC_BROWSER_TEST_F(FileSystemApiTest, FileSystemApiIsWritableTest) { |
198 FilePath test_file = TempFilePath("writable.txt", true); | 204 FilePath test_file = TempFilePath("writable.txt", true); |
199 ASSERT_FALSE(test_file.empty()); | 205 ASSERT_FALSE(test_file.empty()); |
200 FileSystemChooseFileFunction::SkipPickerAndAlwaysSelectPathForTest( | 206 FileSystemChooseFileFunction::SkipPickerAndAlwaysSelectPathForTest( |
201 &test_file); | 207 &test_file); |
202 ASSERT_TRUE(RunPlatformAppTest( | 208 ASSERT_TRUE(RunPlatformAppTest( |
203 "api_test/file_system/is_writable_file_entry")) << message_; | 209 "api_test/file_system/is_writable_file_entry")) << message_; |
204 } | 210 } |
OLD | NEW |