| 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 "base/bind.h" | 5 #include "base/bind.h" |
| 6 #include "base/utf_string_conversions.h" | 6 #include "base/utf_string_conversions.h" |
| 7 #include "chrome/browser/download/download_service.h" | |
| 8 #include "chrome/browser/download/download_service_factory.h" | |
| 9 #include "chrome/browser/net/url_request_mock_util.h" | 7 #include "chrome/browser/net/url_request_mock_util.h" |
| 10 #include "chrome/browser/prefs/browser_prefs.h" | 8 #include "chrome/browser/prefs/browser_prefs.h" |
| 11 #include "chrome/browser/prefs/pref_service.h" | 9 #include "chrome/browser/prefs/pref_service.h" |
| 12 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
| 13 #include "chrome/browser/ui/app_modal_dialogs/app_modal_dialog.h" | 11 #include "chrome/browser/ui/app_modal_dialogs/app_modal_dialog.h" |
| 14 #include "chrome/browser/ui/app_modal_dialogs/native_app_modal_dialog.h" | 12 #include "chrome/browser/ui/app_modal_dialogs/native_app_modal_dialog.h" |
| 13 #include "chrome/browser/ui/browser.h" |
| 15 #include "chrome/browser/ui/browser_commands.h" | 14 #include "chrome/browser/ui/browser_commands.h" |
| 16 #include "chrome/browser/ui/browser_finder.h" | |
| 17 #include "chrome/browser/ui/browser_list.h" | |
| 18 #include "chrome/browser/ui/browser_tabstrip.h" | |
| 19 #include "chrome/browser/ui/browser_window.h" | 15 #include "chrome/browser/ui/browser_window.h" |
| 20 #include "chrome/browser/ui/find_bar/find_bar.h" | |
| 21 #include "chrome/browser/ui/find_bar/find_bar_controller.h" | |
| 22 #include "chrome/browser/ui/panels/base_panel_browser_test.h" | 16 #include "chrome/browser/ui/panels/base_panel_browser_test.h" |
| 23 #include "chrome/browser/ui/panels/docked_panel_strip.h" | 17 #include "chrome/browser/ui/panels/docked_panel_strip.h" |
| 24 #include "chrome/browser/ui/panels/native_panel.h" | 18 #include "chrome/browser/ui/panels/native_panel.h" |
| 25 #include "chrome/browser/ui/panels/panel.h" | 19 #include "chrome/browser/ui/panels/panel.h" |
| 26 #include "chrome/browser/ui/panels/panel_manager.h" | 20 #include "chrome/browser/ui/panels/panel_manager.h" |
| 27 #include "chrome/browser/ui/panels/test_panel_active_state_observer.h" | 21 #include "chrome/browser/ui/panels/test_panel_active_state_observer.h" |
| 28 #include "chrome/browser/ui/tabs/tab_strip_model.h" | |
| 29 #include "chrome/browser/web_applications/web_app.h" | 22 #include "chrome/browser/web_applications/web_app.h" |
| 30 #include "chrome/common/chrome_notification_types.h" | 23 #include "chrome/common/chrome_notification_types.h" |
| 31 #include "chrome/common/extensions/extension_manifest_constants.h" | 24 #include "chrome/common/extensions/extension_manifest_constants.h" |
| 32 #include "chrome/common/pref_names.h" | 25 #include "chrome/common/pref_names.h" |
| 33 #include "chrome/common/url_constants.h" | 26 #include "chrome/common/url_constants.h" |
| 34 #include "chrome/test/base/ui_test_utils.h" | 27 #include "chrome/test/base/ui_test_utils.h" |
| 35 #include "content/public/browser/download_manager.h" | |
| 36 #include "content/public/browser/native_web_keyboard_event.h" | 28 #include "content/public/browser/native_web_keyboard_event.h" |
| 37 #include "content/public/browser/notification_service.h" | 29 #include "content/public/browser/notification_service.h" |
| 38 #include "content/public/browser/web_contents.h" | 30 #include "content/public/browser/web_contents.h" |
| 39 #include "content/public/common/url_constants.h" | 31 #include "content/public/common/url_constants.h" |
| 40 #include "content/public/test/browser_test_utils.h" | 32 #include "content/public/test/browser_test_utils.h" |
| 41 #include "content/test/net/url_request_mock_http_job.h" | 33 #include "content/test/net/url_request_mock_http_job.h" |
| 42 #include "net/base/net_util.h" | 34 #include "net/base/net_util.h" |
| 43 #include "testing/gtest/include/gtest/gtest.h" | 35 #include "testing/gtest/include/gtest/gtest.h" |
| 44 #include "ui/gfx/screen.h" | 36 #include "ui/gfx/screen.h" |
| 45 | 37 |
| 46 using content::BrowserContext; | |
| 47 using content::BrowserThread; | |
| 48 using content::DownloadItem; | |
| 49 using content::DownloadManager; | |
| 50 using content::WebContents; | 38 using content::WebContents; |
| 51 using extensions::Extension; | 39 using extensions::Extension; |
| 52 | 40 |
| 53 class PanelBrowserTest : public BasePanelBrowserTest { | 41 class PanelBrowserTest : public BasePanelBrowserTest { |
| 54 public: | 42 public: |
| 55 PanelBrowserTest() : BasePanelBrowserTest() { | 43 PanelBrowserTest() : BasePanelBrowserTest() { |
| 56 } | 44 } |
| 57 | 45 |
| 58 protected: | 46 protected: |
| 59 // Helper function for debugging. | 47 // Helper function for debugging. |
| (...skipping 1541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1601 ::MSG key_msg = { NULL, WM_KEYDOWN, ui::VKEY_W, 0 }; | 1589 ::MSG key_msg = { NULL, WM_KEYDOWN, ui::VKEY_W, 0 }; |
| 1602 content::NativeWebKeyboardEvent key_event(key_msg); | 1590 content::NativeWebKeyboardEvent key_event(key_msg); |
| 1603 key_event.modifiers = content::NativeWebKeyboardEvent::ControlKey; | 1591 key_event.modifiers = content::NativeWebKeyboardEvent::ControlKey; |
| 1604 #else | 1592 #else |
| 1605 content::NativeWebKeyboardEvent key_event; | 1593 content::NativeWebKeyboardEvent key_event; |
| 1606 #endif | 1594 #endif |
| 1607 panel->HandleKeyboardEvent(key_event); | 1595 panel->HandleKeyboardEvent(key_event); |
| 1608 signal.Wait(); | 1596 signal.Wait(); |
| 1609 EXPECT_EQ(0, panel_manager->num_panels()); | 1597 EXPECT_EQ(0, panel_manager->num_panels()); |
| 1610 } | 1598 } |
| 1611 | |
| OLD | NEW |