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/constrained_window/constrained_window_views.h" | 5 #include "components/constrained_window/constrained_window_views.h" |
6 | 6 |
| 7 #include "base/macros.h" |
7 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "build/build_config.h" |
8 #include "chrome/browser/ui/browser.h" | 10 #include "chrome/browser/ui/browser.h" |
9 #include "chrome/browser/ui/browser_commands.h" | 11 #include "chrome/browser/ui/browser_commands.h" |
10 #include "chrome/browser/ui/host_desktop.h" | 12 #include "chrome/browser/ui/host_desktop.h" |
11 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 13 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
12 #include "chrome/browser/ui/views/tab_modal_confirm_dialog_views.h" | 14 #include "chrome/browser/ui/views/tab_modal_confirm_dialog_views.h" |
13 #include "chrome/common/url_constants.h" | 15 #include "chrome/common/url_constants.h" |
14 #include "chrome/test/base/in_process_browser_test.h" | 16 #include "chrome/test/base/in_process_browser_test.h" |
15 #include "chrome/test/base/interactive_test_utils.h" | 17 #include "chrome/test/base/interactive_test_utils.h" |
16 #include "chrome/test/base/ui_test_utils.h" | 18 #include "chrome/test/base/ui_test_utils.h" |
17 #include "components/web_modal/web_contents_modal_dialog_host.h" | 19 #include "components/web_modal/web_contents_modal_dialog_host.h" |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 #endif | 209 #endif |
208 | 210 |
209 scoped_ptr<TestDialog> dialog = ShowModalDialog( | 211 scoped_ptr<TestDialog> dialog = ShowModalDialog( |
210 browser()->tab_strip_model()->GetActiveWebContents()); | 212 browser()->tab_strip_model()->GetActiveWebContents()); |
211 EXPECT_TRUE(dialog->GetWidget()->IsVisible()); | 213 EXPECT_TRUE(dialog->GetWidget()->IsVisible()); |
212 EXPECT_TRUE(ui_test_utils::SendKeyPressSync(browser(), ui::VKEY_ESCAPE, | 214 EXPECT_TRUE(ui_test_utils::SendKeyPressSync(browser(), ui::VKEY_ESCAPE, |
213 false, false, false, false)); | 215 false, false, false, false)); |
214 content::RunAllPendingInMessageLoop(); | 216 content::RunAllPendingInMessageLoop(); |
215 EXPECT_EQ(NULL, dialog->GetWidget()); | 217 EXPECT_EQ(NULL, dialog->GetWidget()); |
216 } | 218 } |
OLD | NEW |