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 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
259 page_complete.WaitUntilClosed(); | 259 page_complete.WaitUntilClosed(); |
260 | 260 |
261 ASSERT_TRUE(file_handler) << message_; | 261 ASSERT_TRUE(file_handler) << message_; |
262 | 262 |
263 ASSERT_TRUE(RunFileBrowserHandlerTest("read.html", | 263 ASSERT_TRUE(RunFileBrowserHandlerTest("read.html", |
264 "filebrowser_component", | 264 "filebrowser_component", |
265 "")) | 265 "")) |
266 << message_; | 266 << message_; |
267 } | 267 } |
268 | 268 |
| 269 #if defined(ENABLE_WEB_INTENTS) |
269 IN_PROC_BROWSER_TEST_F(FileSystemExtensionApiTest, FileBrowserWebIntentTest) { | 270 IN_PROC_BROWSER_TEST_F(FileSystemExtensionApiTest, FileBrowserWebIntentTest) { |
270 // Create a test file inside the ScopedTempDir. | 271 // Create a test file inside the ScopedTempDir. |
271 FilePath test_file = mount_point_dir_.AppendASCII("text_file.xul"); | 272 FilePath test_file = mount_point_dir_.AppendASCII("text_file.xul"); |
272 CreateFileWithContent(test_file, kTestFileContent); | 273 CreateFileWithContent(test_file, kTestFileContent); |
273 | 274 |
274 ASSERT_TRUE(RunFileBrowserHandlerTest("intent.html#/tmp/text_file.xul", | 275 ASSERT_TRUE(RunFileBrowserHandlerTest("intent.html#/tmp/text_file.xul", |
275 "filebrowser_component", | 276 "filebrowser_component", |
276 "webintent_handler")) | 277 "webintent_handler")) |
277 << message_; | 278 << message_; |
278 } | 279 } |
| 280 #endif |
279 | 281 |
280 IN_PROC_BROWSER_TEST_F(FileSystemExtensionApiTest, FileBrowserTestWrite) { | 282 IN_PROC_BROWSER_TEST_F(FileSystemExtensionApiTest, FileBrowserTestWrite) { |
281 ASSERT_TRUE(RunFileBrowserHandlerTest("write.html", | 283 ASSERT_TRUE(RunFileBrowserHandlerTest("write.html", |
282 "filebrowser_component", | 284 "filebrowser_component", |
283 "filesystem_handler_write")) | 285 "filesystem_handler_write")) |
284 << message_; | 286 << message_; |
285 } | 287 } |
286 | 288 |
287 IN_PROC_BROWSER_TEST_F(FileSystemExtensionApiTest, | 289 IN_PROC_BROWSER_TEST_F(FileSystemExtensionApiTest, |
288 FileBrowserTestWriteReadOnly) { | 290 FileBrowserTestWriteReadOnly) { |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
330 | 332 |
331 IN_PROC_BROWSER_TEST_F(RemoteFileSystemExtensionApiTest, ContentSearch) { | 333 IN_PROC_BROWSER_TEST_F(RemoteFileSystemExtensionApiTest, ContentSearch) { |
332 // Configure the drive service to return only one search result at a time | 334 // Configure the drive service to return only one search result at a time |
333 // to simulate paginated searches. | 335 // to simulate paginated searches. |
334 fake_drive_service_->set_default_max_results(1); | 336 fake_drive_service_->set_default_max_results(1); |
335 EXPECT_TRUE(RunExtensionSubtest("filebrowser_component", "remote_search.html", | 337 EXPECT_TRUE(RunExtensionSubtest("filebrowser_component", "remote_search.html", |
336 kComponentFlags)) << message_; | 338 kComponentFlags)) << message_; |
337 } | 339 } |
338 | 340 |
339 } // namespace | 341 } // namespace |
OLD | NEW |