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

Side by Side Diff: chrome/browser/extensions/platform_app_browsertest.cc

Issue 11826048: Revert 176015 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 11 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 | Annotate | Revision Log
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/test/test_timeouts.h" 6 #include "base/test/test_timeouts.h"
7 #include "base/threading/platform_thread.h" 7 #include "base/threading/platform_thread.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "chrome/app/chrome_command_ids.h" 9 #include "chrome/app/chrome_command_ids.h"
10 #include "chrome/browser/automation/automation_util.h" 10 #include "chrome/browser/automation/automation_util.h"
11 #include "chrome/browser/devtools/devtools_window.h" 11 #include "chrome/browser/devtools/devtools_window.h"
12 #include "chrome/browser/extensions/api/permissions/permissions_api.h" 12 #include "chrome/browser/extensions/api/permissions/permissions_api.h"
13 #include "chrome/browser/extensions/app_restore_service_factory.h"
13 #include "chrome/browser/extensions/app_restore_service.h" 14 #include "chrome/browser/extensions/app_restore_service.h"
14 #include "chrome/browser/extensions/app_restore_service_factory.h"
15 #include "chrome/browser/extensions/extension_browsertest.h" 15 #include "chrome/browser/extensions/extension_browsertest.h"
16 #include "chrome/browser/extensions/extension_prefs.h" 16 #include "chrome/browser/extensions/extension_prefs.h"
17 #include "chrome/browser/extensions/extension_service.h" 17 #include "chrome/browser/extensions/extension_service.h"
18 #include "chrome/browser/extensions/extension_system.h" 18 #include "chrome/browser/extensions/extension_system.h"
19 #include "chrome/browser/extensions/extension_test_message_listener.h" 19 #include "chrome/browser/extensions/extension_test_message_listener.h"
20 #include "chrome/browser/extensions/platform_app_browsertest_util.h" 20 #include "chrome/browser/extensions/platform_app_browsertest_util.h"
21 #include "chrome/browser/extensions/platform_app_launcher.h" 21 #include "chrome/browser/extensions/platform_app_launcher.h"
22 #include "chrome/browser/extensions/shell_window_registry.h" 22 #include "chrome/browser/extensions/shell_window_registry.h"
23 #include "chrome/browser/prefs/pref_service.h" 23 #include "chrome/browser/prefs/pref_service.h"
24 #include "chrome/browser/tab_contents/render_view_context_menu.h" 24 #include "chrome/browser/tab_contents/render_view_context_menu.h"
(...skipping 729 matching lines...) Expand 10 before | Expand all | Expand 10 after
754 // correctly parented. 754 // correctly parented.
755 #if defined(OS_MACOSX) 755 #if defined(OS_MACOSX)
756 #define MAYBE_ConstrainedWindowRequest DISABLED_ConstrainedWindowRequest 756 #define MAYBE_ConstrainedWindowRequest DISABLED_ConstrainedWindowRequest
757 #else 757 #else
758 // TODO(sail): Enable this on other platforms once http://crbug.com/95455 is 758 // TODO(sail): Enable this on other platforms once http://crbug.com/95455 is
759 // fixed. 759 // fixed.
760 #define MAYBE_ConstrainedWindowRequest DISABLED_ConstrainedWindowRequest 760 #define MAYBE_ConstrainedWindowRequest DISABLED_ConstrainedWindowRequest
761 #endif 761 #endif
762 762
763 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, MAYBE_ConstrainedWindowRequest) { 763 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, MAYBE_ConstrainedWindowRequest) {
764 PermissionsRequestFunction::SetIgnoreUserGestureForTests(true); 764 RequestPermissionsFunction::SetIgnoreUserGestureForTests(true);
765 const Extension* extension = 765 const Extension* extension =
766 LoadAndLaunchPlatformApp("optional_permission_request"); 766 LoadAndLaunchPlatformApp("optional_permission_request");
767 ASSERT_TRUE(extension) << "Failed to load extension."; 767 ASSERT_TRUE(extension) << "Failed to load extension.";
768 768
769 WebContents* web_contents = GetFirstShellWindowWebContents(); 769 WebContents* web_contents = GetFirstShellWindowWebContents();
770 ASSERT_TRUE(web_contents); 770 ASSERT_TRUE(web_contents);
771 771
772 // Verify that the shell window has a dialog attached. 772 // Verify that the shell window has a dialog attached.
773 WebContentsModalDialogManager* web_contents_dialog_manager = 773 WebContentsModalDialogManager* web_contents_dialog_manager =
774 WebContentsModalDialogManager::FromWebContents(web_contents); 774 WebContentsModalDialogManager::FromWebContents(web_contents);
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
924 } 924 }
925 925
926 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, Messaging) { 926 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, Messaging) {
927 ExtensionApiTest::ResultCatcher result_catcher; 927 ExtensionApiTest::ResultCatcher result_catcher;
928 LoadAndLaunchPlatformApp("messaging/app2"); 928 LoadAndLaunchPlatformApp("messaging/app2");
929 LoadAndLaunchPlatformApp("messaging/app1"); 929 LoadAndLaunchPlatformApp("messaging/app1");
930 EXPECT_TRUE(result_catcher.GetNextResult()); 930 EXPECT_TRUE(result_catcher.GetNextResult());
931 } 931 }
932 932
933 } // namespace extensions 933 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_service.cc ('k') | chrome/browser/extensions/platform_app_browsertest_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698