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/prefs/pref_service.h" | 6 #include "base/prefs/pref_service.h" |
7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
8 #include "chrome/app/chrome_command_ids.h" | 8 #include "chrome/app/chrome_command_ids.h" |
9 #include "chrome/browser/chrome_notification_types.h" | 9 #include "chrome/browser/chrome_notification_types.h" |
10 #include "chrome/browser/devtools/devtools_window.h" | 10 #include "chrome/browser/devtools/devtools_window.h" |
(...skipping 1740 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1751 | 1751 |
1752 // Panel should become visible when leaving full-screen mode. | 1752 // Panel should become visible when leaving full-screen mode. |
1753 mock_display_settings_provider()->EnableFullScreenMode(false); | 1753 mock_display_settings_provider()->EnableFullScreenMode(false); |
1754 EXPECT_TRUE(panel_testing->IsWindowVisible()); | 1754 EXPECT_TRUE(panel_testing->IsWindowVisible()); |
1755 | 1755 |
1756 PanelManager::GetInstance()->CloseAll(); | 1756 PanelManager::GetInstance()->CloseAll(); |
1757 } | 1757 } |
1758 | 1758 |
1759 class PanelExtensionApiTest : public ExtensionApiTest { | 1759 class PanelExtensionApiTest : public ExtensionApiTest { |
1760 protected: | 1760 protected: |
1761 void SetUpCommandLine(CommandLine* command_line) override { | 1761 void SetUpCommandLine(base::CommandLine* command_line) override { |
1762 ExtensionApiTest::SetUpCommandLine(command_line); | 1762 ExtensionApiTest::SetUpCommandLine(command_line); |
1763 command_line->AppendSwitch(switches::kEnablePanels); | 1763 command_line->AppendSwitch(switches::kEnablePanels); |
1764 } | 1764 } |
1765 }; | 1765 }; |
1766 | 1766 |
1767 #if defined(OS_LINUX) || (!defined(OS_WIN) && defined(USE_AURA)) || \ | 1767 #if defined(OS_LINUX) || (!defined(OS_WIN) && defined(USE_AURA)) || \ |
1768 defined(OS_MACOSX) | 1768 defined(OS_MACOSX) |
1769 // Focus test fails if there is no window manager on Linux. | 1769 // Focus test fails if there is no window manager on Linux. |
1770 // Aura panels have different behavior that do not apply to this test. | 1770 // Aura panels have different behavior that do not apply to this test. |
1771 #define MAYBE_FocusChangeEventOnMinimize DISABLED_FocusChangeEventOnMinimize | 1771 #define MAYBE_FocusChangeEventOnMinimize DISABLED_FocusChangeEventOnMinimize |
1772 #else | 1772 #else |
1773 #define MAYBE_FocusChangeEventOnMinimize FocusChangeEventOnMinimize | 1773 #define MAYBE_FocusChangeEventOnMinimize FocusChangeEventOnMinimize |
1774 #endif | 1774 #endif |
1775 IN_PROC_BROWSER_TEST_F(PanelExtensionApiTest, | 1775 IN_PROC_BROWSER_TEST_F(PanelExtensionApiTest, |
1776 MAYBE_FocusChangeEventOnMinimize) { | 1776 MAYBE_FocusChangeEventOnMinimize) { |
1777 // This is needed so the subsequently created panels can be activated. | 1777 // This is needed so the subsequently created panels can be activated. |
1778 // On a Mac, it transforms background-only test process into foreground one. | 1778 // On a Mac, it transforms background-only test process into foreground one. |
1779 ASSERT_TRUE(ui_test_utils::BringBrowserWindowToFront(browser())); | 1779 ASSERT_TRUE(ui_test_utils::BringBrowserWindowToFront(browser())); |
1780 ASSERT_TRUE(RunExtensionTest("panels/focus_change_on_minimize")) << message_; | 1780 ASSERT_TRUE(RunExtensionTest("panels/focus_change_on_minimize")) << message_; |
1781 } | 1781 } |
OLD | NEW |