| OLD | NEW |
| 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/old_base_panel_browser_test.h" | 5 #include "chrome/browser/ui/panels/old_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 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 320 Browser::CreateParams::CreateForApp( | 320 Browser::CreateParams::CreateForApp( |
| 321 Browser::TYPE_PANEL, params.name, params.bounds, | 321 Browser::TYPE_PANEL, params.name, params.bounds, |
| 322 browser()->profile())); | 322 browser()->profile())); |
| 323 EXPECT_TRUE(panel_browser->is_type_panel()); | 323 EXPECT_TRUE(panel_browser->is_type_panel()); |
| 324 | 324 |
| 325 if (!params.url.is_empty()) { | 325 if (!params.url.is_empty()) { |
| 326 content::WindowedNotificationObserver observer( | 326 content::WindowedNotificationObserver observer( |
| 327 content::NOTIFICATION_LOAD_STOP, | 327 content::NOTIFICATION_LOAD_STOP, |
| 328 content::NotificationService::AllSources()); | 328 content::NotificationService::AllSources()); |
| 329 chrome::AddSelectedTabWithURL(panel_browser, params.url, | 329 chrome::AddSelectedTabWithURL(panel_browser, params.url, |
| 330 content::PAGE_TRANSITION_START_PAGE); | 330 content::PAGE_TRANSITION_AUTO_TOPLEVEL); |
| 331 observer.Wait(); | 331 observer.Wait(); |
| 332 } | 332 } |
| 333 | 333 |
| 334 PanelBrowserWindow* panel_browser_window = | 334 PanelBrowserWindow* panel_browser_window = |
| 335 static_cast<PanelBrowserWindow*>(panel_browser->window()); | 335 static_cast<PanelBrowserWindow*>(panel_browser->window()); |
| 336 Panel* panel = panel_browser_window->panel(); | 336 Panel* panel = panel_browser_window->panel(); |
| 337 | 337 |
| 338 if (!PanelManager::GetInstance()->auto_sizing_enabled() || | 338 if (!PanelManager::GetInstance()->auto_sizing_enabled() || |
| 339 params.bounds.width() || params.bounds.height()) { | 339 params.bounds.width() || params.bounds.height()) { |
| 340 EXPECT_FALSE(panel->auto_resizable()); | 340 EXPECT_FALSE(panel->auto_resizable()); |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 495 } | 495 } |
| 496 | 496 |
| 497 void OldBasePanelBrowserTest::MoveMouse(const gfx::Point& position) { | 497 void OldBasePanelBrowserTest::MoveMouse(const gfx::Point& position) { |
| 498 PanelManager::GetInstance()->mouse_watcher()->NotifyMouseMovement(position); | 498 PanelManager::GetInstance()->mouse_watcher()->NotifyMouseMovement(position); |
| 499 } | 499 } |
| 500 | 500 |
| 501 std::string OldBasePanelBrowserTest::MakePanelName(int index) { | 501 std::string OldBasePanelBrowserTest::MakePanelName(int index) { |
| 502 std::string panel_name("Panel"); | 502 std::string panel_name("Panel"); |
| 503 return panel_name + base::IntToString(index); | 503 return panel_name + base::IntToString(index); |
| 504 } | 504 } |
| OLD | NEW |