| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/ash/system_tray_delegate_chromeos.h" | 5 #include "chrome/browser/ui/ash/system_tray_delegate_chromeos.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "ash/common/system/date/date_default_view.h" | 9 #include "ash/common/system/date/date_default_view.h" |
| 10 #include "ash/common/system/date/date_view.h" | 10 #include "ash/common/system/date/date_view.h" |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 } // namespace | 61 } // namespace |
| 62 | 62 |
| 63 class DisplayNotificationsTest : public InProcessBrowserTest { | 63 class DisplayNotificationsTest : public InProcessBrowserTest { |
| 64 public: | 64 public: |
| 65 DisplayNotificationsTest() {} | 65 DisplayNotificationsTest() {} |
| 66 ~DisplayNotificationsTest() override {} | 66 ~DisplayNotificationsTest() override {} |
| 67 | 67 |
| 68 void SetUp() override { InProcessBrowserTest::SetUp(); } | 68 void SetUp() override { InProcessBrowserTest::SetUp(); } |
| 69 | 69 |
| 70 void UpdateDisplay(const std::string& display_specs) { | 70 void UpdateDisplay(const std::string& display_specs) { |
| 71 ash::test::DisplayManagerTestApi().UpdateDisplay(display_specs); | 71 ash::test::DisplayManagerTestApi( |
| 72 ash::Shell::GetInstance()->display_manager()) |
| 73 .UpdateDisplay(display_specs); |
| 72 } | 74 } |
| 73 | 75 |
| 74 message_center::NotificationList::Notifications GetVisibleNotifications() | 76 message_center::NotificationList::Notifications GetVisibleNotifications() |
| 75 const { | 77 const { |
| 76 return message_center::MessageCenter::Get()->GetVisibleNotifications(); | 78 return message_center::MessageCenter::Get()->GetVisibleNotifications(); |
| 77 } | 79 } |
| 78 }; | 80 }; |
| 79 | 81 |
| 80 class SystemTrayDelegateChromeOSTest : public LoginManagerTest { | 82 class SystemTrayDelegateChromeOSTest : public LoginManagerTest { |
| 81 protected: | 83 protected: |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 | 161 |
| 160 UpdateDisplay("400x400"); | 162 UpdateDisplay("400x400"); |
| 161 | 163 |
| 162 ui_test_utils::NavigateToURL(browser(), GURL("chrome://version")); | 164 ui_test_utils::NavigateToURL(browser(), GURL("chrome://version")); |
| 163 UpdateDisplay("400x400/r"); | 165 UpdateDisplay("400x400/r"); |
| 164 // Ensure that there is a notification that is shown. | 166 // Ensure that there is a notification that is shown. |
| 165 EXPECT_FALSE(GetVisibleNotifications().empty()); | 167 EXPECT_FALSE(GetVisibleNotifications().empty()); |
| 166 } | 168 } |
| 167 | 169 |
| 168 } // namespace chromeos | 170 } // namespace chromeos |
| OLD | NEW |