| 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 "ash/system/chromeos/supervised/tray_supervised_user.h" | 5 #include "ash/system/chromeos/supervised/tray_supervised_user.h" |
| 6 | 6 |
| 7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
| 8 #include "ash/system/user/login_status.h" | 8 #include "ash/system/user/login_status.h" |
| 9 #include "ash/test/ash_test_base.h" | 9 #include "ash/test/ash_test_base.h" |
| 10 #include "ash/test/test_system_tray_delegate.h" | 10 #include "ash/test/test_system_tray_delegate.h" |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 return *iter; | 38 return *iter; |
| 39 } | 39 } |
| 40 return NULL; | 40 return NULL; |
| 41 } | 41 } |
| 42 | 42 |
| 43 class TraySupervisedUserInitialTest : public TraySupervisedUserTest { | 43 class TraySupervisedUserInitialTest : public TraySupervisedUserTest { |
| 44 public: | 44 public: |
| 45 TraySupervisedUserInitialTest() {} | 45 TraySupervisedUserInitialTest() {} |
| 46 virtual ~TraySupervisedUserInitialTest() {} | 46 virtual ~TraySupervisedUserInitialTest() {} |
| 47 | 47 |
| 48 virtual void SetUp() OVERRIDE; | 48 virtual void SetUp() override; |
| 49 virtual void TearDown() OVERRIDE; | 49 virtual void TearDown() override; |
| 50 | 50 |
| 51 private: | 51 private: |
| 52 DISALLOW_COPY_AND_ASSIGN(TraySupervisedUserInitialTest); | 52 DISALLOW_COPY_AND_ASSIGN(TraySupervisedUserInitialTest); |
| 53 }; | 53 }; |
| 54 | 54 |
| 55 void TraySupervisedUserInitialTest::SetUp() { | 55 void TraySupervisedUserInitialTest::SetUp() { |
| 56 test::TestSystemTrayDelegate::SetInitialLoginStatus( | 56 test::TestSystemTrayDelegate::SetInitialLoginStatus( |
| 57 user::LOGGED_IN_SUPERVISED); | 57 user::LOGGED_IN_SUPERVISED); |
| 58 test::AshTestBase::SetUp(); | 58 test::AshTestBase::SetUp(); |
| 59 } | 59 } |
| (...skipping 18 matching lines...) Expand all Loading... |
| 78 TEST_F(TraySupervisedUserInitialTest, SupervisedUserNoCrash) { | 78 TEST_F(TraySupervisedUserInitialTest, SupervisedUserNoCrash) { |
| 79 // Initial login status is already SUPERVISED, which should create | 79 // Initial login status is already SUPERVISED, which should create |
| 80 // the notification and should not cause crashes. | 80 // the notification and should not cause crashes. |
| 81 message_center::Notification* notification = GetPopup(); | 81 message_center::Notification* notification = GetPopup(); |
| 82 ASSERT_NE(static_cast<message_center::Notification*>(NULL), notification); | 82 ASSERT_NE(static_cast<message_center::Notification*>(NULL), notification); |
| 83 EXPECT_EQ(static_cast<int>(message_center::SYSTEM_PRIORITY), | 83 EXPECT_EQ(static_cast<int>(message_center::SYSTEM_PRIORITY), |
| 84 notification->rich_notification_data().priority); | 84 notification->rich_notification_data().priority); |
| 85 } | 85 } |
| 86 | 86 |
| 87 } // namespace | 87 } // namespace |
| OLD | NEW |