| OLD | NEW |
| 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 "apps/launcher.h" | 5 #include "apps/launcher.h" |
| 6 #include "apps/native_app_window.h" | 6 #include "apps/native_app_window.h" |
| 7 #include "apps/shell_window.h" | 7 #include "apps/shell_window.h" |
| 8 #include "apps/shell_window_registry.h" | 8 #include "apps/shell_window_registry.h" |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 831 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 842 const Extension* extension = | 842 const Extension* extension = |
| 843 LoadAndLaunchPlatformApp("optional_permission_request"); | 843 LoadAndLaunchPlatformApp("optional_permission_request"); |
| 844 ASSERT_TRUE(extension) << "Failed to load extension."; | 844 ASSERT_TRUE(extension) << "Failed to load extension."; |
| 845 | 845 |
| 846 WebContents* web_contents = GetFirstShellWindowWebContents(); | 846 WebContents* web_contents = GetFirstShellWindowWebContents(); |
| 847 ASSERT_TRUE(web_contents); | 847 ASSERT_TRUE(web_contents); |
| 848 | 848 |
| 849 // Verify that the shell window has a dialog attached. | 849 // Verify that the shell window has a dialog attached. |
| 850 WebContentsModalDialogManager* web_contents_modal_dialog_manager = | 850 WebContentsModalDialogManager* web_contents_modal_dialog_manager = |
| 851 WebContentsModalDialogManager::FromWebContents(web_contents); | 851 WebContentsModalDialogManager::FromWebContents(web_contents); |
| 852 EXPECT_TRUE(web_contents_modal_dialog_manager->IsShowingDialog()); | 852 EXPECT_TRUE(web_contents_modal_dialog_manager->IsDialogActive()); |
| 853 | 853 |
| 854 // Close the constrained window and wait for the reply to the permission | 854 // Close the constrained window and wait for the reply to the permission |
| 855 // request. | 855 // request. |
| 856 ExtensionTestMessageListener listener("PermissionRequestDone", false); | 856 ExtensionTestMessageListener listener("PermissionRequestDone", false); |
| 857 WebContentsModalDialogManager::TestApi test_api( | 857 WebContentsModalDialogManager::TestApi test_api( |
| 858 web_contents_modal_dialog_manager); | 858 web_contents_modal_dialog_manager); |
| 859 test_api.CloseAllDialogs(); | 859 test_api.CloseAllDialogs(); |
| 860 ASSERT_TRUE(listener.WaitUntilSatisfied()); | 860 ASSERT_TRUE(listener.WaitUntilSatisfied()); |
| 861 } | 861 } |
| 862 | 862 |
| (...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1117 | 1117 |
| 1118 while (!ContainsKey(opener_app_ids_, file_manager->id())) { | 1118 while (!ContainsKey(opener_app_ids_, file_manager->id())) { |
| 1119 content::RunAllPendingInMessageLoop(); | 1119 content::RunAllPendingInMessageLoop(); |
| 1120 } | 1120 } |
| 1121 } | 1121 } |
| 1122 | 1122 |
| 1123 #endif // defined(OS_CHROMEOS) | 1123 #endif // defined(OS_CHROMEOS) |
| 1124 | 1124 |
| 1125 | 1125 |
| 1126 } // namespace extensions | 1126 } // namespace extensions |
| OLD | NEW |