Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(317)

Side by Side Diff: chrome/browser/ui/panels/panel_browsertest.cc

Issue 368163004: Reenable most panel interactive_ui_tests on Linux (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 503 matching lines...) Expand 10 before | Expand all | Expand 10 after
514 // dragged. 514 // dragged.
515 gfx::Point mouse_location(panel->GetBounds().origin()); 515 gfx::Point mouse_location(panel->GetBounds().origin());
516 panel_testing->PressLeftMouseButtonTitlebar(mouse_location); 516 panel_testing->PressLeftMouseButtonTitlebar(mouse_location);
517 panel_testing->DragTitlebar(mouse_location + gfx::Vector2d(-100, 5)); 517 panel_testing->DragTitlebar(mouse_location + gfx::Vector2d(-100, 5));
518 EXPECT_FALSE(panel_testing->IsAnimatingBounds()); 518 EXPECT_FALSE(panel_testing->IsAnimatingBounds());
519 panel_testing->FinishDragTitlebar(); 519 panel_testing->FinishDragTitlebar();
520 520
521 // Set bounds with animation. 521 // Set bounds with animation.
522 gfx::Rect bounds = gfx::Rect(10, 20, 150, 160); 522 gfx::Rect bounds = gfx::Rect(10, 20, 150, 160);
523 panel->SetPanelBounds(bounds); 523 panel->SetPanelBounds(bounds);
524 // There is no animation on Linux, by design.
525 #if !defined(OS_LINUX)
pkotwicz 2014/07/07 14:55:46 It will take some time before we can disable anima
526 EXPECT_TRUE(panel_testing->IsAnimatingBounds()); 524 EXPECT_TRUE(panel_testing->IsAnimatingBounds());
527 WaitForBoundsAnimationFinished(panel); 525 WaitForBoundsAnimationFinished(panel);
528 #endif
529 EXPECT_FALSE(panel_testing->IsAnimatingBounds()); 526 EXPECT_FALSE(panel_testing->IsAnimatingBounds());
530 EXPECT_EQ(bounds, panel->GetBounds()); 527 EXPECT_EQ(bounds, panel->GetBounds());
531 528
532 // Set bounds without animation. 529 // Set bounds without animation.
533 bounds = gfx::Rect(30, 40, 200, 220); 530 bounds = gfx::Rect(30, 40, 200, 220);
534 panel->SetPanelBoundsInstantly(bounds); 531 panel->SetPanelBoundsInstantly(bounds);
535 EXPECT_FALSE(panel_testing->IsAnimatingBounds()); 532 EXPECT_FALSE(panel_testing->IsAnimatingBounds());
536 EXPECT_EQ(bounds, panel->GetBounds()); 533 EXPECT_EQ(bounds, panel->GetBounds());
537 534
538 panel->Close(); 535 panel->Close();
(...skipping 1181 matching lines...) Expand 10 before | Expand all | Expand 10 after
1720 IN_PROC_BROWSER_TEST_F(PanelBrowserTest, 1717 IN_PROC_BROWSER_TEST_F(PanelBrowserTest,
1721 HideDockedPanelCreatedBeforeFullScreenMode) { 1718 HideDockedPanelCreatedBeforeFullScreenMode) {
1722 // Create a docked panel. 1719 // Create a docked panel.
1723 Panel* panel = CreatePanel("PanelTest"); 1720 Panel* panel = CreatePanel("PanelTest");
1724 scoped_ptr<NativePanelTesting> panel_testing(CreateNativePanelTesting(panel)); 1721 scoped_ptr<NativePanelTesting> panel_testing(CreateNativePanelTesting(panel));
1725 1722
1726 // Panel should be visible at first. 1723 // Panel should be visible at first.
1727 EXPECT_TRUE(panel_testing->IsWindowVisible()); 1724 EXPECT_TRUE(panel_testing->IsWindowVisible());
1728 1725
1729 // Panel should become hidden when entering full-screen mode. 1726 // Panel should become hidden when entering full-screen mode.
1730 // Note that this is not needed on Linux because the full-screen window will
1731 // be always placed above any other windows.
1732 mock_display_settings_provider()->EnableFullScreenMode(true); 1727 mock_display_settings_provider()->EnableFullScreenMode(true);
1733 #if defined(OS_LINUX)
1734 EXPECT_TRUE(panel_testing->IsWindowVisible());
1735 #else
1736 EXPECT_FALSE(panel_testing->IsWindowVisible()); 1728 EXPECT_FALSE(panel_testing->IsWindowVisible());
1737 #endif
1738 1729
1739 // Panel should become visible when leaving full-screen mode. 1730 // Panel should become visible when leaving full-screen mode.
1740 mock_display_settings_provider()->EnableFullScreenMode(false); 1731 mock_display_settings_provider()->EnableFullScreenMode(false);
1741 EXPECT_TRUE(panel_testing->IsWindowVisible()); 1732 EXPECT_TRUE(panel_testing->IsWindowVisible());
1742 1733
1743 PanelManager::GetInstance()->CloseAll(); 1734 PanelManager::GetInstance()->CloseAll();
1744 } 1735 }
1745 1736
1746 IN_PROC_BROWSER_TEST_F(PanelBrowserTest, 1737 IN_PROC_BROWSER_TEST_F(PanelBrowserTest,
1747 HideDockedPanelCreatedOnFullScreenMode) { 1738 HideDockedPanelCreatedOnFullScreenMode) {
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
1782 #else 1773 #else
1783 #define MAYBE_FocusChangeEventOnMinimize FocusChangeEventOnMinimize 1774 #define MAYBE_FocusChangeEventOnMinimize FocusChangeEventOnMinimize
1784 #endif 1775 #endif
1785 IN_PROC_BROWSER_TEST_F(PanelExtensionApiTest, 1776 IN_PROC_BROWSER_TEST_F(PanelExtensionApiTest,
1786 MAYBE_FocusChangeEventOnMinimize) { 1777 MAYBE_FocusChangeEventOnMinimize) {
1787 // This is needed so the subsequently created panels can be activated. 1778 // This is needed so the subsequently created panels can be activated.
1788 // On a Mac, it transforms background-only test process into foreground one. 1779 // On a Mac, it transforms background-only test process into foreground one.
1789 ASSERT_TRUE(ui_test_utils::BringBrowserWindowToFront(browser())); 1780 ASSERT_TRUE(ui_test_utils::BringBrowserWindowToFront(browser()));
1790 ASSERT_TRUE(RunExtensionTest("panels/focus_change_on_minimize")) << message_; 1781 ASSERT_TRUE(RunExtensionTest("panels/focus_change_on_minimize")) << message_;
1791 } 1782 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698