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

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

Issue 10836159: Fix bug 141013: OldPanelBrowserTest.CheckDockedPanelProperties is flaky (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/utf_string_conversions.h" 6 #include "base/utf_string_conversions.h"
7 #include "chrome/browser/download/download_service.h" 7 #include "chrome/browser/download/download_service.h"
8 #include "chrome/browser/download/download_service_factory.h" 8 #include "chrome/browser/download/download_service_factory.h"
9 #include "chrome/browser/net/url_request_mock_util.h" 9 #include "chrome/browser/net/url_request_mock_util.h"
10 #include "chrome/browser/prefs/browser_prefs.h" 10 #include "chrome/browser/prefs/browser_prefs.h"
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 250
251 // The below could be separate tests, just adding a TODO here for tracking. 251 // The below could be separate tests, just adding a TODO here for tracking.
252 // TODO(prasadt): Add test for dragging when in titlebar exposed state. 252 // TODO(prasadt): Add test for dragging when in titlebar exposed state.
253 // TODO(prasadt): Add test in presence of auto hiding task bar. 253 // TODO(prasadt): Add test in presence of auto hiding task bar.
254 254
255 for (size_t i = 0; i < panels.size(); ++i) 255 for (size_t i = 0; i < panels.size(); ++i)
256 delete native_panels_testing[i]; 256 delete native_panels_testing[i];
257 } 257 }
258 }; 258 };
259 259
260 // http://crbug.com/141013 260 IN_PROC_BROWSER_TEST_F(OldPanelBrowserTest, CheckDockedPanelProperties) {
261 #if defined(OS_WIN)
262 #define MAYBE_CheckDockedPanelProperties DISABLED_CheckDockedPanelProperties
263 #else
264 #define MAYBE_CheckDockedPanelProperties CheckDockedPanelProperties
265 #endif
266 IN_PROC_BROWSER_TEST_F(OldPanelBrowserTest, MAYBE_CheckDockedPanelProperties) {
267 PanelManager* panel_manager = PanelManager::GetInstance(); 261 PanelManager* panel_manager = PanelManager::GetInstance();
268 DockedPanelStrip* docked_strip = panel_manager->docked_strip(); 262 DockedPanelStrip* docked_strip = panel_manager->docked_strip();
269 263
264 // Don't let actual mouse movements affect this test as that may affect
jennb 2012/08/08 22:04:08 Do you need to make the same change to PanelBrowse
jianli 2012/08/08 22:28:55 Done.
265 // minimized vs title-only state.
266 PanelMouseWatcher* mouse_watcher = new TestPanelMouseWatcher();
267 panel_manager->SetMouseWatcherForTesting(mouse_watcher);
268
270 // Create 3 docked panels that are in expanded, title-only or minimized states 269 // Create 3 docked panels that are in expanded, title-only or minimized states
271 // respectively. 270 // respectively.
272 Panel* panel1 = CreatePanelWithBounds("1", gfx::Rect(0, 0, 100, 100)); 271 Panel* panel1 = CreatePanelWithBounds("1", gfx::Rect(0, 0, 100, 100));
273 Panel* panel2 = CreatePanelWithBounds("2", gfx::Rect(0, 0, 100, 100)); 272 Panel* panel2 = CreatePanelWithBounds("2", gfx::Rect(0, 0, 100, 100));
274 panel2->SetExpansionState(Panel::TITLE_ONLY); 273 panel2->SetExpansionState(Panel::TITLE_ONLY);
275 WaitForExpansionStateChanged(panel2, Panel::TITLE_ONLY); 274 WaitForExpansionStateChanged(panel2, Panel::TITLE_ONLY);
276 Panel* panel3 = CreatePanelWithBounds("3", gfx::Rect(0, 0, 100, 100)); 275 Panel* panel3 = CreatePanelWithBounds("3", gfx::Rect(0, 0, 100, 100));
277 panel3->SetExpansionState(Panel::MINIMIZED); 276 panel3->SetExpansionState(Panel::MINIMIZED);
278 WaitForExpansionStateChanged(panel3, Panel::MINIMIZED); 277 WaitForExpansionStateChanged(panel3, Panel::MINIMIZED);
279 scoped_ptr<NativePanelTesting> panel1_testing( 278 scoped_ptr<NativePanelTesting> panel1_testing(
(...skipping 1252 matching lines...) Expand 10 before | Expand all | Expand 10 after
1532 EXPECT_GE(smaller_work_area_size.width(), panel->max_size().width()); 1531 EXPECT_GE(smaller_work_area_size.width(), panel->max_size().width());
1533 EXPECT_EQ(smaller_work_area_size.height(), panel->max_size().height()); 1532 EXPECT_EQ(smaller_work_area_size.height(), panel->max_size().height());
1534 EXPECT_GT(old_full_size.width(), panel->full_size().width()); 1533 EXPECT_GT(old_full_size.width(), panel->full_size().width());
1535 EXPECT_GT(old_full_size.height(), panel->full_size().height()); 1534 EXPECT_GT(old_full_size.height(), panel->full_size().height());
1536 EXPECT_GE(panel->max_size().width(), panel->full_size().width()); 1535 EXPECT_GE(panel->max_size().width(), panel->full_size().width());
1537 EXPECT_GE(panel->max_size().height(), panel->full_size().height()); 1536 EXPECT_GE(panel->max_size().height(), panel->full_size().height());
1538 EXPECT_EQ(smaller_work_area_size.height(), panel->full_size().height()); 1537 EXPECT_EQ(smaller_work_area_size.height(), panel->full_size().height());
1539 1538
1540 panel->Close(); 1539 panel->Close();
1541 } 1540 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698