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

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

Issue 10483010: Change the visual appearance of panel on GTK per new UI design. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix per feedback Created 8 years, 6 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/message_loop.h" 5 #include "base/message_loop.h"
6 #include "chrome/browser/ui/panels/base_panel_browser_test.h" 6 #include "chrome/browser/ui/panels/base_panel_browser_test.h"
7 #include "chrome/browser/ui/panels/detached_panel_strip.h" 7 #include "chrome/browser/ui/panels/detached_panel_strip.h"
8 #include "chrome/browser/ui/panels/native_panel.h" 8 #include "chrome/browser/ui/panels/native_panel.h"
9 #include "chrome/browser/ui/panels/panel.h" 9 #include "chrome/browser/ui/panels/panel.h"
10 #include "chrome/browser/ui/panels/panel_manager.h" 10 #include "chrome/browser/ui/panels/panel_manager.h"
11 11
12 class DetachedPanelBrowserTest : public BasePanelBrowserTest { 12 class DetachedPanelBrowserTest : public BasePanelBrowserTest {
13 }; 13 };
14 14
15 IN_PROC_BROWSER_TEST_F(DetachedPanelBrowserTest, CheckDetachedPanelProperties) { 15 IN_PROC_BROWSER_TEST_F(DetachedPanelBrowserTest, CheckDetachedPanelProperties) {
16 PanelManager* panel_manager = PanelManager::GetInstance(); 16 PanelManager* panel_manager = PanelManager::GetInstance();
17 DetachedPanelStrip* detached_strip = panel_manager->detached_strip(); 17 DetachedPanelStrip* detached_strip = panel_manager->detached_strip();
18 18
19 Panel* panel = CreateDetachedPanel("1", gfx::Rect(300, 200, 250, 200)); 19 Panel* panel = CreateDetachedPanel("1", gfx::Rect(300, 200, 250, 200));
20 scoped_ptr<NativePanelTesting> panel_testing( 20 scoped_ptr<NativePanelTesting> panel_testing(
21 NativePanelTesting::Create(panel->native_panel())); 21 NativePanelTesting::Create(panel->native_panel()));
22 22
23 EXPECT_EQ(1, panel_manager->num_panels()); 23 EXPECT_EQ(1, panel_manager->num_panels());
24 EXPECT_TRUE(detached_strip->HasPanel(panel)); 24 EXPECT_TRUE(detached_strip->HasPanel(panel));
25 25
26 EXPECT_FALSE(panel->always_on_top()); 26 EXPECT_FALSE(panel->always_on_top());
27 27
28 EXPECT_TRUE(panel_testing->IsButtonVisible(NativePanelTesting::CLOSE_BUTTON)); 28 EXPECT_TRUE(panel_testing->IsButtonVisible(panel::CLOSE_BUTTON));
29 EXPECT_FALSE(panel_testing->IsButtonVisible( 29 EXPECT_FALSE(panel_testing->IsButtonVisible(panel::MINIMIZE_BUTTON));
30 NativePanelTesting::MINIMIZE_BUTTON)); 30 EXPECT_FALSE(panel_testing->IsButtonVisible(panel::RESTORE_BUTTON));
31 EXPECT_FALSE(panel_testing->IsButtonVisible(
32 NativePanelTesting::RESTORE_BUTTON));
33 31
34 EXPECT_EQ(panel::RESIZABLE_ALL_SIDES, panel->CanResizeByMouse()); 32 EXPECT_EQ(panel::RESIZABLE_ALL_SIDES, panel->CanResizeByMouse());
35 33
36 Panel::AttentionMode expected_attention_mode = 34 Panel::AttentionMode expected_attention_mode =
37 static_cast<Panel::AttentionMode>(Panel::USE_PANEL_ATTENTION | 35 static_cast<Panel::AttentionMode>(Panel::USE_PANEL_ATTENTION |
38 Panel::USE_SYSTEM_ATTENTION); 36 Panel::USE_SYSTEM_ATTENTION);
39 EXPECT_EQ(expected_attention_mode, panel->attention_mode()); 37 EXPECT_EQ(expected_attention_mode, panel->attention_mode());
40 38
41 panel_manager->CloseAll(); 39 panel_manager->CloseAll();
42 } 40 }
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 EXPECT_FALSE(panel->IsActive()); 135 EXPECT_FALSE(panel->IsActive());
138 136
139 // Clicking on an inactive detached panel's titlebar activates it. 137 // Clicking on an inactive detached panel's titlebar activates it.
140 test_panel->PressLeftMouseButtonTitlebar(panel->GetBounds().origin()); 138 test_panel->PressLeftMouseButtonTitlebar(panel->GetBounds().origin());
141 test_panel->ReleaseMouseButtonTitlebar(); 139 test_panel->ReleaseMouseButtonTitlebar();
142 WaitForPanelActiveState(panel, SHOW_AS_ACTIVE); 140 WaitForPanelActiveState(panel, SHOW_AS_ACTIVE);
143 EXPECT_FALSE(panel->IsMinimized()); 141 EXPECT_FALSE(panel->IsMinimized());
144 142
145 panel_manager->CloseAll(); 143 panel_manager->CloseAll();
146 } 144 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/titlebar_throb_animation.cc ('k') | chrome/browser/ui/panels/native_panel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698