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/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/mac/scoped_nsautorelease_pool.h" | 10 #include "base/mac/scoped_nsautorelease_pool.h" |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 InProcessBrowserTest::SetUpOnMainThread(); | 170 InProcessBrowserTest::SetUpOnMainThread(); |
171 | 171 |
172 // Setup the work area and desktop bar so that we have consistent testing | 172 // Setup the work area and desktop bar so that we have consistent testing |
173 // environment for all panel related tests. | 173 // environment for all panel related tests. |
174 PanelManager* panel_manager = PanelManager::GetInstance(); | 174 PanelManager* panel_manager = PanelManager::GetInstance(); |
175 mock_auto_hiding_desktop_bar_ = new MockAutoHidingDesktopBarImpl( | 175 mock_auto_hiding_desktop_bar_ = new MockAutoHidingDesktopBarImpl( |
176 panel_manager); | 176 panel_manager); |
177 panel_manager->set_auto_hiding_desktop_bar(mock_auto_hiding_desktop_bar_); | 177 panel_manager->set_auto_hiding_desktop_bar(mock_auto_hiding_desktop_bar_); |
178 panel_manager->SetWorkAreaForTesting(testing_work_area_); | 178 panel_manager->SetWorkAreaForTesting(testing_work_area_); |
179 panel_manager->enable_auto_sizing(false); | 179 panel_manager->enable_auto_sizing(false); |
| 180 panel_manager->remove_delays_for_testing(); |
180 // This is needed so the subsequently created panels can be activated. | 181 // This is needed so the subsequently created panels can be activated. |
181 // On a Mac, it transforms background-only test process into foreground one. | 182 // On a Mac, it transforms background-only test process into foreground one. |
182 EXPECT_TRUE(ui_test_utils::BringBrowserWindowToFront(browser())); | 183 EXPECT_TRUE(ui_test_utils::BringBrowserWindowToFront(browser())); |
183 } | 184 } |
184 | 185 |
185 // TODO(prasadt): If we start having even more of these WaitFor* pattern | 186 // TODO(prasadt): If we start having even more of these WaitFor* pattern |
186 // methods, refactor. The only way to refactor would be to pass in a function | 187 // methods, refactor. The only way to refactor would be to pass in a function |
187 // pointer, it may not be worth complicating the code till we have more of | 188 // pointer, it may not be worth complicating the code till we have more of |
188 // these. | 189 // these. |
189 void BasePanelBrowserTest::WaitForPanelActiveState( | 190 void BasePanelBrowserTest::WaitForPanelActiveState( |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
325 std::string error; | 326 std::string error; |
326 scoped_refptr<Extension> extension = Extension::Create( | 327 scoped_refptr<Extension> extension = Extension::Create( |
327 full_path, location, *input_value, | 328 full_path, location, *input_value, |
328 Extension::STRICT_ERROR_CHECKS, &error); | 329 Extension::STRICT_ERROR_CHECKS, &error); |
329 EXPECT_TRUE(extension.get()); | 330 EXPECT_TRUE(extension.get()); |
330 EXPECT_STREQ("", error.c_str()); | 331 EXPECT_STREQ("", error.c_str()); |
331 browser()->GetProfile()->GetExtensionService()->OnLoadSingleExtension( | 332 browser()->GetProfile()->GetExtensionService()->OnLoadSingleExtension( |
332 extension.get(), false); | 333 extension.get(), false); |
333 return extension; | 334 return extension; |
334 } | 335 } |
OLD | NEW |