Chromium Code Reviews| Index: chrome/browser/ui/panels/panel_browser_view_browsertest.cc |
| diff --git a/chrome/browser/ui/panels/panel_browser_view_browsertest.cc b/chrome/browser/ui/panels/panel_browser_view_browsertest.cc |
| index c18bb23c01296786e4e5ababcd2c07be4e5831b6..96eac11c26c546a9f124cef8bfd783800c10db34 100644 |
| --- a/chrome/browser/ui/panels/panel_browser_view_browsertest.cc |
| +++ b/chrome/browser/ui/panels/panel_browser_view_browsertest.cc |
| @@ -162,6 +162,14 @@ class PanelBrowserViewTest : public BasePanelBrowserTest { |
| } |
| } |
| + void ClosePanelAndWaitForNotification(Panel* panel) { |
| + ui_test_utils::WindowedNotificationObserver signal( |
| + chrome::NOTIFICATION_PANEL_DELETED, |
|
jennb
2011/11/11 21:33:16
Should use BROWSER_CLOSED notification here to ver
prasadt
2011/11/11 22:02:44
Done.
|
| + content::Source<Panel>(panel)); |
| + panel->Close(); |
| + signal.Wait(); |
| + } |
| + |
| // We put all the testing logic in this class instead of the test so that |
| // we do not need to declare each new test as a friend of PanelBrowserView |
| // for the purpose of accessing its private members. |
| @@ -291,9 +299,9 @@ class PanelBrowserViewTest : public BasePanelBrowserTest { |
| 0, 0)); |
| browser_view1->OnTitlebarMouseReleased(); |
| - panel1->Close(); |
| - panel2->Close(); |
| - panel3->Close(); |
| + ClosePanelAndWaitForNotification(panel1); |
| + ClosePanelAndWaitForNotification(panel2); |
| + ClosePanelAndWaitForNotification(panel3); |
| EXPECT_EQ(0, panel_manager->minimized_panel_count()); |
| } |