Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/shelf/shelf_view.h" | 5 #include "ash/shelf/shelf_view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <utility> | 8 #include <utility> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 1823 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1834 } | 1834 } |
| 1835 | 1835 |
| 1836 // Verifies that a Launcher_LaunchTask UMA user action is recorded when | 1836 // Verifies that a Launcher_LaunchTask UMA user action is recorded when |
| 1837 // selecting an icon causes a new window to be created. | 1837 // selecting an icon causes a new window to be created. |
| 1838 TEST_F(ShelfViewTest, Launcher_LaunchTaskIsRecordedWhenNewWindowIsCreated) { | 1838 TEST_F(ShelfViewTest, Launcher_LaunchTaskIsRecordedWhenNewWindowIsCreated) { |
| 1839 base::UserActionTester user_action_tester; | 1839 base::UserActionTester user_action_tester; |
| 1840 test_api_->RecordIconActivatedAction(ShelfItemDelegate::kNewWindowCreated); | 1840 test_api_->RecordIconActivatedAction(ShelfItemDelegate::kNewWindowCreated); |
| 1841 EXPECT_EQ(1, user_action_tester.GetActionCount("Launcher_LaunchTask")); | 1841 EXPECT_EQ(1, user_action_tester.GetActionCount("Launcher_LaunchTask")); |
| 1842 } | 1842 } |
| 1843 | 1843 |
| 1844 // Verifies that a Launcher_MinimizeTask UMA user action is recorded when | |
| 1845 // selecting an icon causes an existing window to be minimized. | |
| 1846 TEST_F(ShelfViewTest, Launcher_MinimizeTaskIsRecordedWhenNewWindowIsCreated) { | |
|
oshima
2015/04/21 22:52:15
The name sounds odd. Shouldn't this be something l
bruthig
2015/04/21 23:06:46
Done.
| |
| 1847 base::UserActionTester user_action_tester; | |
| 1848 test_api_->RecordIconActivatedAction( | |
| 1849 ShelfItemDelegate::kExistingWindowMinimized); | |
| 1850 EXPECT_EQ(1, user_action_tester.GetActionCount("Launcher_MinimizeTask")); | |
| 1851 } | |
| 1852 | |
| 1844 // Verifies that a Launcher_SwitchTask UMA user action is recorded when | 1853 // Verifies that a Launcher_SwitchTask UMA user action is recorded when |
| 1845 // selecting an icon causes an existing window to be activated. | 1854 // selecting an icon causes an existing window to be activated. |
| 1846 TEST_F(ShelfViewTest, | 1855 TEST_F(ShelfViewTest, |
| 1847 Launcher_SwitchTaskIsRecordedWhenExistingWindowIsActivated) { | 1856 Launcher_SwitchTaskIsRecordedWhenExistingWindowIsActivated) { |
| 1848 base::UserActionTester user_action_tester; | 1857 base::UserActionTester user_action_tester; |
| 1849 test_api_->RecordIconActivatedAction( | 1858 test_api_->RecordIconActivatedAction( |
| 1850 ShelfItemDelegate::kExistingWindowActivated); | 1859 ShelfItemDelegate::kExistingWindowActivated); |
| 1851 EXPECT_EQ(1, user_action_tester.GetActionCount("Launcher_SwitchTask")); | 1860 EXPECT_EQ(1, user_action_tester.GetActionCount("Launcher_SwitchTask")); |
| 1852 } | 1861 } |
| 1853 | 1862 |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1894 test_api_->RunMessageLoopUntilAnimationsDone(); | 1903 test_api_->RunMessageLoopUntilAnimationsDone(); |
| 1895 CheckAllItemsAreInBounds(); | 1904 CheckAllItemsAreInBounds(); |
| 1896 } | 1905 } |
| 1897 | 1906 |
| 1898 INSTANTIATE_TEST_CASE_P(LtrRtl, ShelfViewTextDirectionTest, testing::Bool()); | 1907 INSTANTIATE_TEST_CASE_P(LtrRtl, ShelfViewTextDirectionTest, testing::Bool()); |
| 1899 INSTANTIATE_TEST_CASE_P(VisibleBounds, ShelfViewVisibleBoundsTest, | 1908 INSTANTIATE_TEST_CASE_P(VisibleBounds, ShelfViewVisibleBoundsTest, |
| 1900 testing::Bool()); | 1909 testing::Bool()); |
| 1901 | 1910 |
| 1902 } // namespace test | 1911 } // namespace test |
| 1903 } // namespace ash | 1912 } // namespace ash |
| OLD | NEW |