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

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

Issue 10689082: Fix flaky linux panel tests related to active state checks (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove log msg Created 8 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/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"
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 EXPECT_FALSE(panel->IsMinimized()); 128 EXPECT_FALSE(panel->IsMinimized());
129 129
130 test_panel->PressLeftMouseButtonTitlebar(panel->GetBounds().origin(), 130 test_panel->PressLeftMouseButtonTitlebar(panel->GetBounds().origin(),
131 panel::APPLY_TO_ALL); 131 panel::APPLY_TO_ALL);
132 test_panel->ReleaseMouseButtonTitlebar(panel::APPLY_TO_ALL); 132 test_panel->ReleaseMouseButtonTitlebar(panel::APPLY_TO_ALL);
133 EXPECT_TRUE(panel->IsActive()); 133 EXPECT_TRUE(panel->IsActive());
134 EXPECT_FALSE(panel->IsMinimized()); 134 EXPECT_FALSE(panel->IsMinimized());
135 135
136 // Create a second panel to cause the first to become inactive. 136 // Create a second panel to cause the first to become inactive.
137 CreateDetachedPanel("2", gfx::Rect(100, 200, 230, 345)); 137 CreateDetachedPanel("2", gfx::Rect(100, 200, 230, 345));
138 EXPECT_FALSE(panel->IsActive()); 138 WaitForPanelActiveState(panel, SHOW_AS_INACTIVE);
139 139
140 // Clicking on an inactive detached panel's titlebar activates it. 140 // Clicking on an inactive detached panel's titlebar activates it.
141 test_panel->PressLeftMouseButtonTitlebar(panel->GetBounds().origin()); 141 test_panel->PressLeftMouseButtonTitlebar(panel->GetBounds().origin());
142 test_panel->ReleaseMouseButtonTitlebar(); 142 test_panel->ReleaseMouseButtonTitlebar();
143 WaitForPanelActiveState(panel, SHOW_AS_ACTIVE); 143 WaitForPanelActiveState(panel, SHOW_AS_ACTIVE);
144 EXPECT_FALSE(panel->IsMinimized()); 144 EXPECT_FALSE(panel->IsMinimized());
145 145
146 panel_manager->CloseAll(); 146 panel_manager->CloseAll();
147 } 147 }
148 148
149 #endif // OS_MACOSX 149 #endif // OS_MACOSX
OLDNEW
« no previous file with comments | « chrome/browser/ui/panels/base_panel_browser_test.cc ('k') | chrome/browser/ui/panels/old_base_panel_browser_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698