| 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/platform_file.h" | 6 #include "base/platform_file.h" |
| 7 #include "base/path_service.h" | 7 #include "base/path_service.h" |
| 8 #include "base/scoped_temp_dir.h" | 8 #include "base/scoped_temp_dir.h" |
| 9 #include "base/stringprintf.h" | 9 #include "base/stringprintf.h" |
| 10 #include "chrome/browser/chromeos/gdata/gdata_file_system_proxy.h" | 10 #include "chrome/browser/chromeos/gdata/gdata_file_system_proxy.h" |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 } | 192 } |
| 193 | 193 |
| 194 IN_PROC_BROWSER_TEST_F(FileSystemExtensionApiTest, FileBrowserTestWrite) { | 194 IN_PROC_BROWSER_TEST_F(FileSystemExtensionApiTest, FileBrowserTestWrite) { |
| 195 AddTmpMountPoint(); | 195 AddTmpMountPoint(); |
| 196 ASSERT_TRUE(RunExtensionTest("filesystem_handler_write")) << message_; | 196 ASSERT_TRUE(RunExtensionTest("filesystem_handler_write")) << message_; |
| 197 ASSERT_TRUE(RunExtensionSubtest( | 197 ASSERT_TRUE(RunExtensionSubtest( |
| 198 "filebrowser_component", "write.html", kComponentFlags)) << message_; | 198 "filebrowser_component", "write.html", kComponentFlags)) << message_; |
| 199 } | 199 } |
| 200 | 200 |
| 201 IN_PROC_BROWSER_TEST_F(FileSystemExtensionApiTest, | 201 IN_PROC_BROWSER_TEST_F(FileSystemExtensionApiTest, |
| 202 FileBrowserTestWriteReadOnly) { |
| 203 AddTmpMountPoint(); |
| 204 ASSERT_TRUE(RunExtensionTest("filesystem_handler_write")) << message_; |
| 205 ASSERT_FALSE(RunExtensionSubtest( |
| 206 "filebrowser_component", "write.html#def", kComponentFlags)) << message_; |
| 207 } |
| 208 |
| 209 IN_PROC_BROWSER_TEST_F(FileSystemExtensionApiTest, |
| 202 FileBrowserTestWriteComponent) { | 210 FileBrowserTestWriteComponent) { |
| 203 AddTmpMountPoint(); | 211 AddTmpMountPoint(); |
| 204 ASSERT_TRUE(RunComponentExtensionTest("filesystem_handler_write")) | 212 ASSERT_TRUE(RunComponentExtensionTest("filesystem_handler_write")) |
| 205 << message_; | 213 << message_; |
| 206 ASSERT_TRUE(RunExtensionSubtest( | 214 ASSERT_TRUE(RunExtensionSubtest( |
| 207 "filebrowser_component", "write.html", kComponentFlags)) << message_; | 215 "filebrowser_component", "write.html", kComponentFlags)) << message_; |
| 208 } | 216 } |
| 209 | 217 |
| 210 IN_PROC_BROWSER_TEST_F(RemoteFileSystemExtensionApiTest, RemoteMountPoint) { | 218 IN_PROC_BROWSER_TEST_F(RemoteFileSystemExtensionApiTest, RemoteMountPoint) { |
| 211 AddTmpMountPoint(); | 219 AddTmpMountPoint(); |
| (...skipping 20 matching lines...) Expand all Loading... |
| 232 .WillOnce(MockCreateSnapshotFile( | 240 .WillOnce(MockCreateSnapshotFile( |
| 233 base::PLATFORM_FILE_OK, | 241 base::PLATFORM_FILE_OK, |
| 234 test_file_info_, | 242 test_file_info_, |
| 235 // Returns the path to the temporary file on the local drive. | 243 // Returns the path to the temporary file on the local drive. |
| 236 test_file_path_, | 244 test_file_path_, |
| 237 scoped_refptr<webkit_blob::ShareableFileReference>(NULL))); | 245 scoped_refptr<webkit_blob::ShareableFileReference>(NULL))); |
| 238 ASSERT_TRUE(RunExtensionSubtest( | 246 ASSERT_TRUE(RunExtensionSubtest( |
| 239 "filebrowser_component", "remote.html#" + GetPathOnMountPoint(""), | 247 "filebrowser_component", "remote.html#" + GetPathOnMountPoint(""), |
| 240 kComponentFlags)) << message_; | 248 kComponentFlags)) << message_; |
| 241 } | 249 } |
| OLD | NEW |