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/bind.h" | 5 #include "base/bind.h" |
6 #include "base/file_path.h" | 6 #include "base/file_path.h" |
7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
8 #include "base/files/scoped_temp_dir.h" | 8 #include "base/files/scoped_temp_dir.h" |
9 #include "base/json/json_file_value_serializer.h" | 9 #include "base/json/json_file_value_serializer.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 page_complete.WaitUntilClosed(); | 260 page_complete.WaitUntilClosed(); |
261 | 261 |
262 ASSERT_TRUE(file_handler) << message_; | 262 ASSERT_TRUE(file_handler) << message_; |
263 | 263 |
264 ASSERT_TRUE(RunFileBrowserHandlerTest("read.html", | 264 ASSERT_TRUE(RunFileBrowserHandlerTest("read.html", |
265 "filebrowser_component", | 265 "filebrowser_component", |
266 "")) | 266 "")) |
267 << message_; | 267 << message_; |
268 } | 268 } |
269 | 269 |
270 #if defined(ENABLE_WEB_INTENTS) | |
271 IN_PROC_BROWSER_TEST_F(FileSystemExtensionApiTest, FileBrowserWebIntentTest) { | |
272 // Create a test file inside the ScopedTempDir. | |
273 base::FilePath test_file = mount_point_dir_.AppendASCII("text_file.xul"); | |
274 CreateFileWithContent(test_file, kTestFileContent); | |
275 | |
276 ASSERT_TRUE(RunFileBrowserHandlerTest("intent.html#/tmp/text_file.xul", | |
277 "filebrowser_component", | |
278 "webintent_handler")) | |
279 << message_; | |
280 } | |
281 #endif | |
282 | |
283 IN_PROC_BROWSER_TEST_F(FileSystemExtensionApiTest, FileBrowserTestWrite) { | 270 IN_PROC_BROWSER_TEST_F(FileSystemExtensionApiTest, FileBrowserTestWrite) { |
284 ASSERT_TRUE(RunFileBrowserHandlerTest("write.html", | 271 ASSERT_TRUE(RunFileBrowserHandlerTest("write.html", |
285 "filebrowser_component", | 272 "filebrowser_component", |
286 "filesystem_handler_write")) | 273 "filesystem_handler_write")) |
287 << message_; | 274 << message_; |
288 } | 275 } |
289 | 276 |
290 IN_PROC_BROWSER_TEST_F(FileSystemExtensionApiTest, | 277 IN_PROC_BROWSER_TEST_F(FileSystemExtensionApiTest, |
291 FileBrowserTestWriteReadOnly) { | 278 FileBrowserTestWriteReadOnly) { |
292 ASSERT_FALSE(RunFileBrowserHandlerTest("write.html#def", | 279 ASSERT_FALSE(RunFileBrowserHandlerTest("write.html#def", |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
339 kComponentFlags)) << message_; | 326 kComponentFlags)) << message_; |
340 } | 327 } |
341 | 328 |
342 IN_PROC_BROWSER_TEST_F(RemoteFileSystemExtensionApiTest, MetadataSearch) { | 329 IN_PROC_BROWSER_TEST_F(RemoteFileSystemExtensionApiTest, MetadataSearch) { |
343 EXPECT_TRUE(RunExtensionSubtest("filebrowser_component", | 330 EXPECT_TRUE(RunExtensionSubtest("filebrowser_component", |
344 "metadata_search.html", | 331 "metadata_search.html", |
345 kComponentFlags)) << message_; | 332 kComponentFlags)) << message_; |
346 } | 333 } |
347 | 334 |
348 } // namespace | 335 } // namespace |
OLD | NEW |