OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
276 ui_test_utils::WindowedNotificationObserver observer( | 276 ui_test_utils::WindowedNotificationObserver observer( |
277 content::NOTIFICATION_LOAD_STOP, | 277 content::NOTIFICATION_LOAD_STOP, |
278 content::NotificationService::AllSources()); | 278 content::NotificationService::AllSources()); |
279 panel_browser->AddSelectedTabWithURL(params.url, | 279 panel_browser->AddSelectedTabWithURL(params.url, |
280 content::PAGE_TRANSITION_START_PAGE); | 280 content::PAGE_TRANSITION_START_PAGE); |
281 observer.Wait(); | 281 observer.Wait(); |
282 } | 282 } |
283 | 283 |
284 Panel* panel = static_cast<Panel*>(panel_browser->window()); | 284 Panel* panel = static_cast<Panel*>(panel_browser->window()); |
285 | 285 |
| 286 if (params.bounds.width() || params.bounds.height()) |
| 287 EXPECT_FALSE(panel->auto_resizable()); |
| 288 else |
| 289 EXPECT_TRUE(panel->auto_resizable()); |
| 290 |
286 if (params.show_flag == SHOW_AS_ACTIVE) { | 291 if (params.show_flag == SHOW_AS_ACTIVE) { |
287 panel->Show(); | 292 panel->Show(); |
288 } else { | 293 } else { |
289 #if defined(OS_LINUX) | 294 #if defined(OS_LINUX) |
290 // On bots, we might have a simple window manager which always activates new | 295 // On bots, we might have a simple window manager which always activates new |
291 // windows, and can't always deactivate them. Activate previously active | 296 // windows, and can't always deactivate them. Activate previously active |
292 // window back to ensure the new window is inactive. | 297 // window back to ensure the new window is inactive. |
293 if (ui::GuessWindowManager() == ui::WM_ICE_WM) { | 298 if (ui::GuessWindowManager() == ui::WM_ICE_WM) { |
294 Browser* last_active_browser = BrowserList::GetLastActive(); | 299 Browser* last_active_browser = BrowserList::GetLastActive(); |
295 EXPECT_TRUE(last_active_browser); | 300 EXPECT_TRUE(last_active_browser); |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
356 std::string error; | 361 std::string error; |
357 scoped_refptr<Extension> extension = Extension::Create( | 362 scoped_refptr<Extension> extension = Extension::Create( |
358 full_path, location, *input_value, | 363 full_path, location, *input_value, |
359 Extension::STRICT_ERROR_CHECKS, &error); | 364 Extension::STRICT_ERROR_CHECKS, &error); |
360 EXPECT_TRUE(extension.get()); | 365 EXPECT_TRUE(extension.get()); |
361 EXPECT_STREQ("", error.c_str()); | 366 EXPECT_STREQ("", error.c_str()); |
362 browser()->GetProfile()->GetExtensionService()-> | 367 browser()->GetProfile()->GetExtensionService()-> |
363 OnExtensionInstalled(extension.get(), false, -1); | 368 OnExtensionInstalled(extension.get(), false, -1); |
364 return extension; | 369 return extension; |
365 } | 370 } |
OLD | NEW |