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

Side by Side Diff: chrome/browser/apps/app_pointer_lock_interactive_uitest.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
« no previous file with comments | « chrome/browser/apps/app_browsertest.cc ('k') | chrome/browser/apps/app_window_browsertest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "chrome/browser/apps/app_browsertest_util.h" 5 #include "chrome/browser/apps/app_browsertest_util.h"
6 #include "chrome/browser/extensions/extension_test_message_listener.h" 6 #include "chrome/browser/extensions/extension_test_message_listener.h"
7 #include "chrome/browser/ui/extensions/application_launch.h" 7 #include "chrome/browser/ui/extensions/application_launch.h"
8 #include "chrome/test/base/interactive_test_utils.h" 8 #include "chrome/test/base/interactive_test_utils.h"
9 #include "extensions/test/result_catcher.h"
9 10
10 class ExtensionPointerLockTest : public extensions::PlatformAppBrowserTest { 11 class ExtensionPointerLockTest : public extensions::PlatformAppBrowserTest {
11 public: 12 public:
12 bool RunExtensionPointerLockTest(const char* app_path) { 13 bool RunExtensionPointerLockTest(const char* app_path) {
13 ExtensionTestMessageListener launched_listener("Launched", true); 14 ExtensionTestMessageListener launched_listener("Launched", true);
14 LoadAndLaunchPlatformApp(app_path, &launched_listener); 15 LoadAndLaunchPlatformApp(app_path, &launched_listener);
15 16
16 ResultCatcher catcher; 17 extensions::ResultCatcher catcher;
17 18
18 if (!ui_test_utils::ShowAndFocusNativeWindow( 19 if (!ui_test_utils::ShowAndFocusNativeWindow(
19 GetFirstAppWindow()->GetNativeWindow())) { 20 GetFirstAppWindow()->GetNativeWindow())) {
20 message_ = "Can't focus window"; 21 message_ = "Can't focus window";
21 return false; 22 return false;
22 } 23 }
23 24
24 launched_listener.Reply(""); 25 launched_listener.Reply("");
25 26
26 if (!catcher.GetNextResult()) { 27 if (!catcher.GetNextResult()) {
(...skipping 12 matching lines...) Expand all
39 ASSERT_TRUE(RunExtensionPointerLockTest("pointer_lock/no_permission")) 40 ASSERT_TRUE(RunExtensionPointerLockTest("pointer_lock/no_permission"))
40 << message_; 41 << message_;
41 } 42 }
42 43
43 IN_PROC_BROWSER_TEST_F(ExtensionPointerLockTest, 44 IN_PROC_BROWSER_TEST_F(ExtensionPointerLockTest,
44 ExtensionPointerLockAccessPass) { 45 ExtensionPointerLockAccessPass) {
45 // Test that pointer lock can be accessed from an extension with permission. 46 // Test that pointer lock can be accessed from an extension with permission.
46 ASSERT_TRUE(RunExtensionPointerLockTest("pointer_lock/has_permission")) 47 ASSERT_TRUE(RunExtensionPointerLockTest("pointer_lock/has_permission"))
47 << message_; 48 << message_;
48 } 49 }
OLDNEW
« no previous file with comments | « chrome/browser/apps/app_browsertest.cc ('k') | chrome/browser/apps/app_window_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698