| 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 "base/i18n/time_formatting.h" | 5 #include "base/i18n/time_formatting.h" |
| 6 #include "base/memory/scoped_ptr.h" | 6 #include "base/memory/scoped_ptr.h" |
| 7 #include "chrome/browser/extensions/extension_service.h" | 7 #include "chrome/browser/extensions/extension_service.h" |
| 8 #include "chrome/browser/profiles/profile.h" | 8 #include "chrome/browser/profiles/profile.h" |
| 9 #include "chrome/browser/ui/browser_window.h" | 9 #include "chrome/browser/ui/browser_window.h" |
| 10 #include "chrome/browser/ui/panels/base_panel_browser_test.h" | 10 #include "chrome/browser/ui/panels/base_panel_browser_test.h" |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 } | 141 } |
| 142 | 142 |
| 143 bool ContainsControl(Panel* panel, views::View* control) const { | 143 bool ContainsControl(Panel* panel, views::View* control) const { |
| 144 return GetBrowserView(panel)->GetFrameView()->Contains(control); | 144 return GetBrowserView(panel)->GetFrameView()->Contains(control); |
| 145 } | 145 } |
| 146 | 146 |
| 147 void WaitTillBoundsAnimationFinished(Panel* panel) { | 147 void WaitTillBoundsAnimationFinished(Panel* panel) { |
| 148 // The timer for the animation will only kick in as async task. | 148 // The timer for the animation will only kick in as async task. |
| 149 while (GetBoundsAnimator(panel)->is_animating()) { | 149 while (GetBoundsAnimator(panel)->is_animating()) { |
| 150 MessageLoopForUI::current()->PostTask(FROM_HERE, | 150 MessageLoopForUI::current()->PostTask(FROM_HERE, |
| 151 new MessageLoop::QuitTask()); | 151 MessageLoop::QuitClosure()); |
| 152 MessageLoopForUI::current()->RunAllPending(); | 152 MessageLoopForUI::current()->RunAllPending(); |
| 153 } | 153 } |
| 154 } | 154 } |
| 155 | 155 |
| 156 void WaitTillSettingsAnimationFinished(Panel* panel) { | 156 void WaitTillSettingsAnimationFinished(Panel* panel) { |
| 157 // The timer for the animation will only kick in as async task. | 157 // The timer for the animation will only kick in as async task. |
| 158 while (GetSettingsButtonAnimator(panel)->is_animating()) { | 158 while (GetSettingsButtonAnimator(panel)->is_animating()) { |
| 159 MessageLoopForUI::current()->PostTask(FROM_HERE, | 159 MessageLoopForUI::current()->PostTask(FROM_HERE, |
| 160 new MessageLoop::QuitTask()); | 160 MessageLoop::QuitClosure()); |
| 161 MessageLoopForUI::current()->RunAllPending(); | 161 MessageLoopForUI::current()->RunAllPending(); |
| 162 } | 162 } |
| 163 } | 163 } |
| 164 | 164 |
| 165 void ClosePanelAndWaitForNotification(Panel* panel) { | 165 void ClosePanelAndWaitForNotification(Panel* panel) { |
| 166 ui_test_utils::WindowedNotificationObserver signal( | 166 ui_test_utils::WindowedNotificationObserver signal( |
| 167 chrome::NOTIFICATION_BROWSER_CLOSED, | 167 chrome::NOTIFICATION_BROWSER_CLOSED, |
| 168 content::Source<Browser>(panel->browser())); | 168 content::Source<Browser>(panel->browser())); |
| 169 panel->Close(); | 169 panel->Close(); |
| 170 signal.Wait(); | 170 signal.Wait(); |
| (...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 613 // http://crbug.com/102734 | 613 // http://crbug.com/102734 |
| 614 IN_PROC_BROWSER_TEST_F(PanelBrowserViewTest, DISABLED_DrawAttention) { | 614 IN_PROC_BROWSER_TEST_F(PanelBrowserViewTest, DISABLED_DrawAttention) { |
| 615 TestDrawAttention(); | 615 TestDrawAttention(); |
| 616 } | 616 } |
| 617 | 617 |
| 618 IN_PROC_BROWSER_TEST_F(PanelBrowserViewTest, | 618 IN_PROC_BROWSER_TEST_F(PanelBrowserViewTest, |
| 619 ChangeAutoHideTaskBarThickness) { | 619 ChangeAutoHideTaskBarThickness) { |
| 620 TestChangeAutoHideTaskBarThickness(); | 620 TestChangeAutoHideTaskBarThickness(); |
| 621 } | 621 } |
| 622 #endif | 622 #endif |
| OLD | NEW |