Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(74)

Side by Side Diff: chrome/browser/chromeos/file_manager/external_filesystem_apitest.cc

Issue 555633003: Use extensions::ResultCatcher; delete ExtensionApiTest::ResultCatcher. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/files/file_path.h" 6 #include "base/files/file_path.h"
7 #include "base/files/file_util.h" 7 #include "base/files/file_util.h"
8 #include "base/files/scoped_temp_dir.h" 8 #include "base/files/scoped_temp_dir.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
11 #include "chrome/browser/chromeos/drive/drive_integration_service.h" 11 #include "chrome/browser/chromeos/drive/drive_integration_service.h"
12 #include "chrome/browser/chromeos/file_manager/drive_test_util.h" 12 #include "chrome/browser/chromeos/file_manager/drive_test_util.h"
13 #include "chrome/browser/chromeos/file_manager/volume_manager.h" 13 #include "chrome/browser/chromeos/file_manager/volume_manager.h"
14 #include "chrome/browser/chromeos/profiles/profile_helper.h" 14 #include "chrome/browser/chromeos/profiles/profile_helper.h"
15 #include "chrome/browser/drive/fake_drive_service.h" 15 #include "chrome/browser/drive/fake_drive_service.h"
16 #include "chrome/browser/extensions/extension_apitest.h" 16 #include "chrome/browser/extensions/extension_apitest.h"
17 #include "chrome/browser/profiles/profile.h" 17 #include "chrome/browser/profiles/profile.h"
18 #include "chrome/browser/profiles/profile_manager.h" 18 #include "chrome/browser/profiles/profile_manager.h"
19 #include "chrome/browser/ui/browser.h" 19 #include "chrome/browser/ui/browser.h"
20 #include "chrome/common/chrome_constants.h" 20 #include "chrome/common/chrome_constants.h"
21 #include "chrome/common/chrome_paths.h" 21 #include "chrome/common/chrome_paths.h"
22 #include "components/user_manager/user_manager.h" 22 #include "components/user_manager/user_manager.h"
23 #include "content/public/browser/browser_context.h" 23 #include "content/public/browser/browser_context.h"
24 #include "content/public/browser/notification_service.h" 24 #include "content/public/browser/notification_service.h"
25 #include "content/public/test/test_utils.h" 25 #include "content/public/test/test_utils.h"
26 #include "extensions/browser/notification_types.h" 26 #include "extensions/browser/notification_types.h"
27 #include "extensions/test/result_catcher.h"
27 #include "google_apis/drive/drive_api_parser.h" 28 #include "google_apis/drive/drive_api_parser.h"
28 #include "google_apis/drive/test_util.h" 29 #include "google_apis/drive/test_util.h"
29 #include "google_apis/drive/time_util.h" 30 #include "google_apis/drive/time_util.h"
30 #include "webkit/browser/fileapi/external_mount_points.h" 31 #include "webkit/browser/fileapi/external_mount_points.h"
31 32
32 // Tests for access to external file systems (as defined in 33 // Tests for access to external file systems (as defined in
33 // webkit/common/fileapi/file_system_types.h) from extensions with 34 // webkit/common/fileapi/file_system_types.h) from extensions with
34 // fileBrowserPrivate and fileBrowserHandler extension permissions. 35 // fileBrowserPrivate and fileBrowserHandler extension permissions.
35 // The tests cover following external file system types: 36 // The tests cover following external file system types:
36 // - local (kFileSystemTypeLocalNative): a local file system on which files are 37 // - local (kFileSystemTypeLocalNative): a local file system on which files are
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 if (!file_handler) 364 if (!file_handler)
364 return false; 365 return false;
365 366
366 if (flags & FLAGS_LAZY_FILE_HANDLER) { 367 if (flags & FLAGS_LAZY_FILE_HANDLER) {
367 page_complete.WaitUntilClosed(); 368 page_complete.WaitUntilClosed();
368 } else { 369 } else {
369 page_complete.WaitUntilLoaded(); 370 page_complete.WaitUntilLoaded();
370 } 371 }
371 } 372 }
372 373
373 ResultCatcher catcher; 374 extensions::ResultCatcher catcher;
374 375
375 const Extension* file_browser = LoadExtensionAsComponentWithManifest( 376 const Extension* file_browser = LoadExtensionAsComponentWithManifest(
376 test_data_dir_.AppendASCII(filebrowser_path), 377 test_data_dir_.AppendASCII(filebrowser_path),
377 filebrowser_manifest); 378 filebrowser_manifest);
378 if (!file_browser) 379 if (!file_browser)
379 return false; 380 return false;
380 381
381 if (!catcher.GetNextResult()) { 382 if (!catcher.GetNextResult()) {
382 message_ = catcher.message(); 383 message_ = catcher.message();
383 return false; 384 return false;
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
790 AppFileHandlerMulti) { 791 AppFileHandlerMulti) {
791 EXPECT_TRUE( 792 EXPECT_TRUE(
792 RunFileSystemExtensionApiTest("file_browser/app_file_handler_multi", 793 RunFileSystemExtensionApiTest("file_browser/app_file_handler_multi",
793 FILE_PATH_LITERAL("manifest.json"), 794 FILE_PATH_LITERAL("manifest.json"),
794 "", 795 "",
795 FLAGS_NONE)) 796 FLAGS_NONE))
796 << message_; 797 << message_;
797 } 798 }
798 } // namespace 799 } // namespace
799 } // namespace file_manager 800 } // namespace file_manager
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698