| 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/json/json_file_value_serializer.h" | 8 #include "base/json/json_file_value_serializer.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/message_loop_proxy.h" | 10 #include "base/message_loop_proxy.h" |
| (...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 } | 244 } |
| 245 | 245 |
| 246 IN_PROC_BROWSER_TEST_F(FileSystemExtensionApiTest, FileBrowserTestLazy) { | 246 IN_PROC_BROWSER_TEST_F(FileSystemExtensionApiTest, FileBrowserTestLazy) { |
| 247 AddTmpMountPoint(); | 247 AddTmpMountPoint(); |
| 248 ASSERT_TRUE(LoadExtensionAndWait("filesystem_handler_lazy_background")) | 248 ASSERT_TRUE(LoadExtensionAndWait("filesystem_handler_lazy_background")) |
| 249 << message_; | 249 << message_; |
| 250 ASSERT_TRUE(RunExtensionSubtest( | 250 ASSERT_TRUE(RunExtensionSubtest( |
| 251 "filebrowser_component", "read.html", kComponentFlags)) << message_; | 251 "filebrowser_component", "read.html", kComponentFlags)) << message_; |
| 252 } | 252 } |
| 253 | 253 |
| 254 IN_PROC_BROWSER_TEST_F(FileSystemExtensionApiTest, FileBrowserWebIntentTest) { |
| 255 ResultCatcher catcher; |
| 256 |
| 257 AddTmpMountPoint(); |
| 258 ASSERT_TRUE(LoadExtension(test_data_dir_.AppendASCII("webintent_handler"))); |
| 259 ASSERT_TRUE(RunExtensionSubtest( |
| 260 "filebrowser_component", |
| 261 "intent-read.html", |
| 262 kComponentFlags)) << message_; |
| 263 |
| 264 // The webintent_handler only sends chrome.test.succeed() on successful |
| 265 // receipt of the incoming Web Intent. |
| 266 ASSERT_TRUE(catcher.GetNextResult()) << message_; |
| 267 } |
| 268 |
| 254 IN_PROC_BROWSER_TEST_F(FileSystemExtensionApiTest, FileBrowserTestWrite) { | 269 IN_PROC_BROWSER_TEST_F(FileSystemExtensionApiTest, FileBrowserTestWrite) { |
| 255 AddTmpMountPoint(); | 270 AddTmpMountPoint(); |
| 256 ASSERT_TRUE(RunExtensionTest("filesystem_handler_write")) << message_; | 271 ASSERT_TRUE(RunExtensionTest("filesystem_handler_write")) << message_; |
| 257 ASSERT_TRUE(RunExtensionSubtest( | 272 ASSERT_TRUE(RunExtensionSubtest( |
| 258 "filebrowser_component", "write.html", kComponentFlags)) << message_; | 273 "filebrowser_component", "write.html", kComponentFlags)) << message_; |
| 259 } | 274 } |
| 260 | 275 |
| 261 IN_PROC_BROWSER_TEST_F(FileSystemExtensionApiTest, | 276 IN_PROC_BROWSER_TEST_F(FileSystemExtensionApiTest, |
| 262 FileBrowserTestWriteReadOnly) { | 277 FileBrowserTestWriteReadOnly) { |
| 263 AddTmpMountPoint(); | 278 AddTmpMountPoint(); |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 355 _, _)) | 370 _, _)) |
| 356 .WillOnce(MockDownloadFileCallback(gdata::HTTP_SUCCESS)); | 371 .WillOnce(MockDownloadFileCallback(gdata::HTTP_SUCCESS)); |
| 357 | 372 |
| 358 // On exit, all operations in progress should be cancelled. | 373 // On exit, all operations in progress should be cancelled. |
| 359 EXPECT_CALL(*mock_drive_service_, CancelAll()); | 374 EXPECT_CALL(*mock_drive_service_, CancelAll()); |
| 360 | 375 |
| 361 // All is set... RUN THE TEST. | 376 // All is set... RUN THE TEST. |
| 362 EXPECT_TRUE(RunExtensionSubtest("filebrowser_component", "remote_search.html", | 377 EXPECT_TRUE(RunExtensionSubtest("filebrowser_component", "remote_search.html", |
| 363 kComponentFlags)) << message_; | 378 kComponentFlags)) << message_; |
| 364 } | 379 } |
| OLD | NEW |