| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/shell.h" | 5 #include "ash/shell.h" |
| 6 #include "ash/test/ash_test_base.h" | 6 #include "ash/test/ash_test_base.h" |
| 7 #include "ash/test/test_session_state_delegate.h" | 7 #include "ash/test/test_session_state_delegate.h" |
| 8 #include "ash/test/test_shell_delegate.h" | 8 #include "ash/test/test_shell_delegate.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 TEST_F(MultiUserContextMenuChromeOSTest, OwnedWindow) { | 89 TEST_F(MultiUserContextMenuChromeOSTest, OwnedWindow) { |
| 90 // Make the window owned and check that there is no menu (since only a single | 90 // Make the window owned and check that there is no menu (since only a single |
| 91 // user exists). | 91 // user exists). |
| 92 multi_user_window_manager()->SetWindowOwner(window(), | 92 multi_user_window_manager()->SetWindowOwner(window(), |
| 93 AccountId::FromUserEmail("A")); | 93 AccountId::FromUserEmail("A")); |
| 94 EXPECT_EQ(NULL, CreateMultiUserContextMenu(window()).get()); | 94 EXPECT_EQ(NULL, CreateMultiUserContextMenu(window()).get()); |
| 95 | 95 |
| 96 // After adding another user a menu should get created. | 96 // After adding another user a menu should get created. |
| 97 { | 97 { |
| 98 SetNumberOfUsers(2); | 98 SetNumberOfUsers(2); |
| 99 scoped_ptr<ui::MenuModel> menu = CreateMultiUserContextMenu(window()); | 99 std::unique_ptr<ui::MenuModel> menu = CreateMultiUserContextMenu(window()); |
| 100 ASSERT_TRUE(menu.get()); | 100 ASSERT_TRUE(menu.get()); |
| 101 EXPECT_EQ(1, menu.get()->GetItemCount()); | 101 EXPECT_EQ(1, menu.get()->GetItemCount()); |
| 102 } | 102 } |
| 103 { | 103 { |
| 104 SetNumberOfUsers(3); | 104 SetNumberOfUsers(3); |
| 105 scoped_ptr<ui::MenuModel> menu = CreateMultiUserContextMenu(window()); | 105 std::unique_ptr<ui::MenuModel> menu = CreateMultiUserContextMenu(window()); |
| 106 ASSERT_TRUE(menu.get()); | 106 ASSERT_TRUE(menu.get()); |
| 107 EXPECT_EQ(2, menu.get()->GetItemCount()); | 107 EXPECT_EQ(2, menu.get()->GetItemCount()); |
| 108 } | 108 } |
| 109 } | 109 } |
| 110 | 110 |
| 111 } // namespace test | 111 } // namespace test |
| 112 } // namespace ash | 112 } // namespace ash |
| OLD | NEW |