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

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

Issue 9517010: Change panels to be able to turn off autoresize. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Redisable test. Created 8 years, 9 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 "chrome/browser/ui/panels/base_panel_browser_test.h" 5 #include "chrome/browser/ui/panels/base_panel_browser_test.h"
6 6
7 #include "chrome/browser/ui/browser_list.h" 7 #include "chrome/browser/ui/browser_list.h"
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 ui_test_utils::WindowedNotificationObserver observer( 321 ui_test_utils::WindowedNotificationObserver observer(
322 content::NOTIFICATION_LOAD_STOP, 322 content::NOTIFICATION_LOAD_STOP,
323 content::NotificationService::AllSources()); 323 content::NotificationService::AllSources());
324 panel_browser->AddSelectedTabWithURL(params.url, 324 panel_browser->AddSelectedTabWithURL(params.url,
325 content::PAGE_TRANSITION_START_PAGE); 325 content::PAGE_TRANSITION_START_PAGE);
326 observer.Wait(); 326 observer.Wait();
327 } 327 }
328 328
329 Panel* panel = static_cast<Panel*>(panel_browser->window()); 329 Panel* panel = static_cast<Panel*>(panel_browser->window());
330 330
331 if (params.bounds.width() || params.bounds.height()) 331 if (!PanelManager::GetInstance()->auto_sizing_enabled() ||
332 params.bounds.width() || params.bounds.height()) {
332 EXPECT_FALSE(panel->auto_resizable()); 333 EXPECT_FALSE(panel->auto_resizable());
333 else 334 } else {
334 EXPECT_TRUE(panel->auto_resizable()); 335 EXPECT_TRUE(panel->auto_resizable());
336 }
335 337
336 if (params.show_flag == SHOW_AS_ACTIVE) { 338 if (params.show_flag == SHOW_AS_ACTIVE) {
337 panel->Show(); 339 panel->Show();
338 } else { 340 } else {
339 #if defined(OS_LINUX) 341 #if defined(OS_LINUX)
340 // On bots, we might have a simple window manager which always activates new 342 // On bots, we might have a simple window manager which always activates new
341 // windows, and can't always deactivate them. Activate previously active 343 // windows, and can't always deactivate them. Activate previously active
342 // window back to ensure the new window is inactive. 344 // window back to ensure the new window is inactive.
343 // Skip this icewm logic if not waiting for full creation of panel 345 // Skip this icewm logic if not waiting for full creation of panel
344 // as those tests aren't affected by which panel is activated. 346 // as those tests aren't affected by which panel is activated.
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
434 } 436 }
435 437
436 void BasePanelBrowserTest::MoveMouse(const gfx::Point& position) { 438 void BasePanelBrowserTest::MoveMouse(const gfx::Point& position) {
437 PanelManager::GetInstance()->mouse_watcher()->NotifyMouseMovement(position); 439 PanelManager::GetInstance()->mouse_watcher()->NotifyMouseMovement(position);
438 } 440 }
439 441
440 std::string BasePanelBrowserTest::MakePanelName(int index) { 442 std::string BasePanelBrowserTest::MakePanelName(int index) {
441 std::string panel_name("Panel"); 443 std::string panel_name("Panel");
442 return panel_name + base::IntToString(index); 444 return panel_name + base::IntToString(index);
443 } 445 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698