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

Side by Side Diff: chrome/browser/extensions/api/media_galleries/media_galleries_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/auto_reset.h" 5 #include "base/auto_reset.h"
6 #include "base/callback.h" 6 #include "base/callback.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/json/json_writer.h" 9 #include "base/json/json_writer.h"
10 #include "base/numerics/safe_conversions.h" 10 #include "base/numerics/safe_conversions.h"
(...skipping 10 matching lines...) Expand all
21 #include "chrome/browser/media_galleries/media_galleries_scan_result_controller. h" 21 #include "chrome/browser/media_galleries/media_galleries_scan_result_controller. h"
22 #include "chrome/browser/media_galleries/media_galleries_test_util.h" 22 #include "chrome/browser/media_galleries/media_galleries_test_util.h"
23 #include "chrome/browser/media_galleries/media_scan_manager.h" 23 #include "chrome/browser/media_galleries/media_scan_manager.h"
24 #include "chrome/common/chrome_paths.h" 24 #include "chrome/common/chrome_paths.h"
25 #include "components/storage_monitor/storage_info.h" 25 #include "components/storage_monitor/storage_info.h"
26 #include "components/storage_monitor/storage_monitor.h" 26 #include "components/storage_monitor/storage_monitor.h"
27 #include "content/public/browser/web_contents.h" 27 #include "content/public/browser/web_contents.h"
28 #include "content/public/test/test_utils.h" 28 #include "content/public/test/test_utils.h"
29 #include "extensions/browser/extension_system.h" 29 #include "extensions/browser/extension_system.h"
30 #include "extensions/common/extension.h" 30 #include "extensions/common/extension.h"
31 #include "extensions/test/result_catcher.h"
31 #include "media/base/test_data_util.h" 32 #include "media/base/test_data_util.h"
32 33
33 #if defined(OS_WIN) || defined(OS_MACOSX) 34 #if defined(OS_WIN) || defined(OS_MACOSX)
34 #include "chrome/browser/media_galleries/fileapi/picasa_finder.h" 35 #include "chrome/browser/media_galleries/fileapi/picasa_finder.h"
35 #include "chrome/common/media_galleries/picasa_test_util.h" 36 #include "chrome/common/media_galleries/picasa_test_util.h"
36 #include "chrome/common/media_galleries/picasa_types.h" 37 #include "chrome/common/media_galleries/picasa_types.h"
37 #include "chrome/common/media_galleries/pmp_test_util.h" 38 #include "chrome/common/media_galleries/pmp_test_util.h"
38 #endif 39 #endif
39 40
40 #if defined(OS_MACOSX) 41 #if defined(OS_MACOSX)
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 base::FilePath app_dir_; 462 base::FilePath app_dir_;
462 }; 463 };
463 464
464 IN_PROC_BROWSER_TEST_F(MediaGalleriesPlatformAppPpapiTest, SendFilesystem) { 465 IN_PROC_BROWSER_TEST_F(MediaGalleriesPlatformAppPpapiTest, SendFilesystem) {
465 RemoveAllGalleries(); 466 RemoveAllGalleries();
466 MakeSingleFakeGallery(NULL); 467 MakeSingleFakeGallery(NULL);
467 468
468 const extensions::Extension* extension = LoadExtension(app_dir()); 469 const extensions::Extension* extension = LoadExtension(app_dir());
469 ASSERT_TRUE(extension); 470 ASSERT_TRUE(extension);
470 471
471 ResultCatcher catcher; 472 extensions::ResultCatcher catcher;
472 AppLaunchParams params(browser()->profile(), 473 AppLaunchParams params(browser()->profile(),
473 extension, 474 extension,
474 extensions::LAUNCH_CONTAINER_NONE, 475 extensions::LAUNCH_CONTAINER_NONE,
475 NEW_WINDOW); 476 NEW_WINDOW);
476 params.command_line = *CommandLine::ForCurrentProcess(); 477 params.command_line = *CommandLine::ForCurrentProcess();
477 OpenApplication(params); 478 OpenApplication(params);
478 479
479 bool result = true; 480 bool result = true;
480 if (!catcher.GetNextResult()) { 481 if (!catcher.GetNextResult()) {
481 message_ = catcher.message(); 482 message_ = catcher.message();
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
668 669
669 base::ListValue custom_args; 670 base::ListValue custom_args;
670 #if defined(USE_PROPRIETARY_CODECS) 671 #if defined(USE_PROPRIETARY_CODECS)
671 custom_args.AppendBoolean(true); 672 custom_args.AppendBoolean(true);
672 #else 673 #else
673 custom_args.AppendBoolean(false); 674 custom_args.AppendBoolean(false);
674 #endif 675 #endif
675 ASSERT_TRUE(RunMediaGalleriesTestWithArg("media_metadata", custom_args)) 676 ASSERT_TRUE(RunMediaGalleriesTestWithArg("media_metadata", custom_args))
676 << message_; 677 << message_;
677 } 678 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698