| 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/bind.h" | 5 #include "base/bind.h" |
| 6 #include "base/string_number_conversions.h" | 6 #include "base/string_number_conversions.h" |
| 7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
| 8 #include "chrome/browser/browser_process.h" | 8 #include "chrome/browser/browser_process.h" |
| 9 #include "chrome/browser/download/download_service.h" | 9 #include "chrome/browser/download/download_service.h" |
| 10 #include "chrome/browser/download/download_service_factory.h" | 10 #include "chrome/browser/download/download_service_factory.h" |
| (...skipping 1836 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1847 const BalloonCollection::Balloons& balloons() const { | 1847 const BalloonCollection::Balloons& balloons() const { |
| 1848 return balloons_->GetActiveBalloons(); | 1848 return balloons_->GetActiveBalloons(); |
| 1849 } | 1849 } |
| 1850 | 1850 |
| 1851 private: | 1851 private: |
| 1852 BalloonCollectionImpl* balloons_; // Owned by NotificationUIManager. | 1852 BalloonCollectionImpl* balloons_; // Owned by NotificationUIManager. |
| 1853 scoped_ptr<NotificationUIManager> ui_manager_; | 1853 scoped_ptr<NotificationUIManager> ui_manager_; |
| 1854 scoped_ptr<DesktopNotificationService> service_; | 1854 scoped_ptr<DesktopNotificationService> service_; |
| 1855 }; | 1855 }; |
| 1856 | 1856 |
| 1857 IN_PROC_BROWSER_TEST_F(PanelAndNotificationTest, NoOverlapping) { | 1857 IN_PROC_BROWSER_TEST_F(PanelAndNotificationTest, DISABLED_NoOverlapping) { |
| 1858 const int kPanelWidth = 200; | 1858 const int kPanelWidth = 200; |
| 1859 const int kShortPanelHeight = 150; | 1859 const int kShortPanelHeight = 150; |
| 1860 const int kTallPanelHeight = 200; | 1860 const int kTallPanelHeight = 200; |
| 1861 | 1861 |
| 1862 content::ShowDesktopNotificationHostMsgParams params = | 1862 content::ShowDesktopNotificationHostMsgParams params = |
| 1863 StandardTestNotification(); | 1863 StandardTestNotification(); |
| 1864 EXPECT_TRUE(service()->ShowDesktopNotification( | 1864 EXPECT_TRUE(service()->ShowDesktopNotification( |
| 1865 params, 0, 0, DesktopNotificationService::PageNotification)); | 1865 params, 0, 0, DesktopNotificationService::PageNotification)); |
| 1866 MessageLoopForUI::current()->RunAllPending(); | 1866 MessageLoopForUI::current()->RunAllPending(); |
| 1867 Balloon* balloon = balloons().front(); | 1867 Balloon* balloon = balloons().front(); |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1938 // position when tall panel brings up its titlebar. | 1938 // position when tall panel brings up its titlebar. |
| 1939 CloseWindowAndWait(panel1->browser()); | 1939 CloseWindowAndWait(panel1->browser()); |
| 1940 EXPECT_EQ(balloon_bottom_after_tall_panel_titlebar_up, | 1940 EXPECT_EQ(balloon_bottom_after_tall_panel_titlebar_up, |
| 1941 GetBalloonBottomPosition(balloon)); | 1941 GetBalloonBottomPosition(balloon)); |
| 1942 | 1942 |
| 1943 // Closing the remaining tall panel should move the notification balloon back | 1943 // Closing the remaining tall panel should move the notification balloon back |
| 1944 // to its original position. | 1944 // to its original position. |
| 1945 CloseWindowAndWait(panel2->browser()); | 1945 CloseWindowAndWait(panel2->browser()); |
| 1946 EXPECT_EQ(original_balloon_bottom, GetBalloonBottomPosition(balloon)); | 1946 EXPECT_EQ(original_balloon_bottom, GetBalloonBottomPosition(balloon)); |
| 1947 } | 1947 } |
| OLD | NEW |