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

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

Issue 2899253002: chromeos: Rename ash::WmShelf to Shelf (Closed)
Patch Set: rebase Created 3 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_button.cc ('k') | ash/shelf/shelf_controller.h » ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_button_pressed_metric_tracker.h" 5 #include "ash/shelf/shelf_button_pressed_metric_tracker.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "ash/public/cpp/config.h" 9 #include "ash/public/cpp/config.h"
10 #include "ash/shelf/wm_shelf.h" 10 #include "ash/shelf/shelf.h"
11 #include "ash/shell.h" 11 #include "ash/shell.h"
12 #include "ash/test/ash_test_base.h" 12 #include "ash/test/ash_test_base.h"
13 #include "ash/test/shelf_button_pressed_metric_tracker_test_api.h" 13 #include "ash/test/shelf_button_pressed_metric_tracker_test_api.h"
14 #include "ash/test/shelf_view_test_api.h" 14 #include "ash/test/shelf_view_test_api.h"
15 #include "base/macros.h" 15 #include "base/macros.h"
16 #include "base/test/histogram_tester.h" 16 #include "base/test/histogram_tester.h"
17 #include "base/test/simple_test_tick_clock.h" 17 #include "base/test/simple_test_tick_clock.h"
18 #include "base/test/user_action_tester.h" 18 #include "base/test/user_action_tester.h"
19 #include "testing/gtest/include/gtest/gtest.h" 19 #include "testing/gtest/include/gtest/gtest.h"
20 #include "ui/events/event.h" 20 #include "ui/events/event.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 ShelfButtonPressedMetricTracker:: 99 ShelfButtonPressedMetricTracker::
100 kTimeBetweenWindowMinimizedAndActivatedActionsHistogramName; 100 kTimeBetweenWindowMinimizedAndActivatedActionsHistogramName;
101 101
102 ShelfButtonPressedMetricTrackerTest::ShelfButtonPressedMetricTrackerTest() {} 102 ShelfButtonPressedMetricTrackerTest::ShelfButtonPressedMetricTrackerTest() {}
103 103
104 ShelfButtonPressedMetricTrackerTest::~ShelfButtonPressedMetricTrackerTest() {} 104 ShelfButtonPressedMetricTrackerTest::~ShelfButtonPressedMetricTrackerTest() {}
105 105
106 void ShelfButtonPressedMetricTrackerTest::SetUp() { 106 void ShelfButtonPressedMetricTrackerTest::SetUp() {
107 AshTestBase::SetUp(); 107 AshTestBase::SetUp();
108 108
109 WmShelf* wm_shelf = GetPrimaryShelf(); 109 Shelf* shelf = GetPrimaryShelf();
110 ShelfViewTestAPI shelf_view_test_api(wm_shelf->GetShelfViewForTesting()); 110 ShelfViewTestAPI shelf_view_test_api(shelf->GetShelfViewForTesting());
111 111
112 metric_tracker_ = shelf_view_test_api.shelf_button_pressed_metric_tracker(); 112 metric_tracker_ = shelf_view_test_api.shelf_button_pressed_metric_tracker();
113 113
114 ShelfButtonPressedMetricTrackerTestAPI test_api(metric_tracker_); 114 ShelfButtonPressedMetricTrackerTestAPI test_api(metric_tracker_);
115 115
116 std::unique_ptr<base::TickClock> test_tick_clock( 116 std::unique_ptr<base::TickClock> test_tick_clock(
117 new base::SimpleTestTickClock()); 117 new base::SimpleTestTickClock());
118 tick_clock_ = static_cast<base::SimpleTestTickClock*>(test_tick_clock.get()); 118 tick_clock_ = static_cast<base::SimpleTestTickClock*>(test_tick_clock.get());
119 test_api.SetTickClock(std::move(test_tick_clock)); 119 test_api.SetTickClock(std::move(test_tick_clock));
120 120
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 307
308 histogram_tester.ExpectTotalCount( 308 histogram_tester.ExpectTotalCount(
309 kTimeBetweenWindowMinimizedAndActivatedActionsHistogramName, 1); 309 kTimeBetweenWindowMinimizedAndActivatedActionsHistogramName, 1);
310 histogram_tester.ExpectBucketCount( 310 histogram_tester.ExpectBucketCount(
311 kTimeBetweenWindowMinimizedAndActivatedActionsHistogramName, 311 kTimeBetweenWindowMinimizedAndActivatedActionsHistogramName,
312 kTimeDeltaInMilliseconds, 1); 312 kTimeDeltaInMilliseconds, 1);
313 } 313 }
314 314
315 } // namespace test 315 } // namespace test
316 } // namespace ash 316 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shelf/shelf_button.cc ('k') | ash/shelf/shelf_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698