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 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 // environment for all panel related tests. | 183 // environment for all panel related tests. |
184 PanelManager* panel_manager = PanelManager::GetInstance(); | 184 PanelManager* panel_manager = PanelManager::GetInstance(); |
185 mock_auto_hiding_desktop_bar_ = new MockAutoHidingDesktopBarImpl( | 185 mock_auto_hiding_desktop_bar_ = new MockAutoHidingDesktopBarImpl( |
186 panel_manager); | 186 panel_manager); |
187 panel_manager->set_auto_hiding_desktop_bar(mock_auto_hiding_desktop_bar_); | 187 panel_manager->set_auto_hiding_desktop_bar(mock_auto_hiding_desktop_bar_); |
188 // Do not use the testing work area if it is empty since we're going to | 188 // Do not use the testing work area if it is empty since we're going to |
189 // use the actual work area in some testing scenarios. | 189 // use the actual work area in some testing scenarios. |
190 if (!testing_work_area_.IsEmpty()) | 190 if (!testing_work_area_.IsEmpty()) |
191 panel_manager->SetWorkAreaForTesting(testing_work_area_); | 191 panel_manager->SetWorkAreaForTesting(testing_work_area_); |
192 panel_manager->enable_auto_sizing(false); | 192 panel_manager->enable_auto_sizing(false); |
193 panel_manager->remove_delays_for_testing(); | 193 |
194 // This is needed so the subsequently created panels can be activated. | 194 // This is needed so the subsequently created panels can be activated. |
195 // On a Mac, it transforms background-only test process into foreground one. | 195 // On a Mac, it transforms background-only test process into foreground one. |
196 EXPECT_TRUE(ui_test_utils::BringBrowserWindowToFront(browser())); | 196 EXPECT_TRUE(ui_test_utils::BringBrowserWindowToFront(browser())); |
197 } | 197 } |
198 | 198 |
199 void BasePanelBrowserTest::WaitForPanelAdded(Panel* panel) { | 199 void BasePanelBrowserTest::WaitForPanelAdded(Panel* panel) { |
200 if (ExistsPanel(panel)) | 200 if (ExistsPanel(panel)) |
201 return; | 201 return; |
202 ui_test_utils::WindowedNotificationObserver signal( | 202 ui_test_utils::WindowedNotificationObserver signal( |
203 chrome::NOTIFICATION_PANEL_ADDED, | 203 chrome::NOTIFICATION_PANEL_ADDED, |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
372 std::string error; | 372 std::string error; |
373 scoped_refptr<Extension> extension = Extension::Create( | 373 scoped_refptr<Extension> extension = Extension::Create( |
374 full_path, location, *input_value, | 374 full_path, location, *input_value, |
375 Extension::STRICT_ERROR_CHECKS, &error); | 375 Extension::STRICT_ERROR_CHECKS, &error); |
376 EXPECT_TRUE(extension.get()); | 376 EXPECT_TRUE(extension.get()); |
377 EXPECT_STREQ("", error.c_str()); | 377 EXPECT_STREQ("", error.c_str()); |
378 browser()->GetProfile()->GetExtensionService()-> | 378 browser()->GetProfile()->GetExtensionService()-> |
379 OnExtensionInstalled(extension.get(), false, -1); | 379 OnExtensionInstalled(extension.get(), false, -1); |
380 return extension; | 380 return extension; |
381 } | 381 } |
OLD | NEW |