| OLD | NEW |
| 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 "components/web_modal/web_contents_modal_dialog_manager.h" | 5 #include "components/web_modal/web_contents_modal_dialog_manager.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 std::unique_ptr<TestWebContentsModalDialogManagerDelegate> delegate; | 119 std::unique_ptr<TestWebContentsModalDialogManagerDelegate> delegate; |
| 120 WebContentsModalDialogManager* manager; | 120 WebContentsModalDialogManager* manager; |
| 121 std::unique_ptr<WebContentsModalDialogManager::TestApi> test_api; | 121 std::unique_ptr<WebContentsModalDialogManager::TestApi> test_api; |
| 122 | 122 |
| 123 DISALLOW_COPY_AND_ASSIGN(WebContentsModalDialogManagerTest); | 123 DISALLOW_COPY_AND_ASSIGN(WebContentsModalDialogManagerTest); |
| 124 }; | 124 }; |
| 125 | 125 |
| 126 SingleWebContentsDialogManager* | 126 SingleWebContentsDialogManager* |
| 127 WebContentsModalDialogManager::CreateNativeWebModalManager( | 127 WebContentsModalDialogManager::CreateNativeWebModalManager( |
| 128 gfx::NativeWindow dialog, | 128 gfx::NativeWindow dialog, |
| 129 SingleWebContentsDialogManagerDelegate* native_delegate) { | 129 SingleWebContentsDialogManagerDelegate* native_delegate, |
| 130 bool * independent_bounds, |
| 131 const char * kHasIndependentBoundsKey) { |
| 130 NOTREACHED(); | 132 NOTREACHED(); |
| 131 return new TestNativeWebContentsModalDialogManager( | 133 return new TestNativeWebContentsModalDialogManager( |
| 132 dialog, | 134 dialog, |
| 133 native_delegate, | 135 native_delegate, |
| 134 &unused_tracker); | 136 &unused_tracker); |
| 135 } | 137 } |
| 136 | 138 |
| 137 // Test that the dialog is shown immediately when the delegate indicates the web | 139 // Test that the dialog is shown immediately when the delegate indicates the web |
| 138 // contents is visible. | 140 // contents is visible. |
| 139 TEST_F(WebContentsModalDialogManagerTest, WebContentsVisible) { | 141 TEST_F(WebContentsModalDialogManagerTest, WebContentsVisible) { |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 343 | 345 |
| 344 test_api->CloseAllDialogs(); | 346 test_api->CloseAllDialogs(); |
| 345 | 347 |
| 346 EXPECT_FALSE(delegate->web_contents_blocked()); | 348 EXPECT_FALSE(delegate->web_contents_blocked()); |
| 347 EXPECT_FALSE(manager->IsDialogActive()); | 349 EXPECT_FALSE(manager->IsDialogActive()); |
| 348 for (int i = 0; i < kWindowCount; i++) | 350 for (int i = 0; i < kWindowCount; i++) |
| 349 EXPECT_EQ(NativeManagerTracker::CLOSED, trackers[i].state_); | 351 EXPECT_EQ(NativeManagerTracker::CLOSED, trackers[i].state_); |
| 350 } | 352 } |
| 351 | 353 |
| 352 } // namespace web_modal | 354 } // namespace web_modal |
| OLD | NEW |