Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1157)

Side by Side Diff: ash/shelf/shelf_view_unittest.cc

Issue 1100763002: Inject CanAddURLToHistory into TopSitesImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@prefs
Patch Set: Fix error introduced during rebase Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ash/shelf/shelf_view.cc ('k') | ash/wm/overview/window_grid.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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_MinimizeTaskIsRecordedWhenWindowIsMinimized) {
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
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
OLDNEW
« no previous file with comments | « ash/shelf/shelf_view.cc ('k') | ash/wm/overview/window_grid.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698