OLD | NEW |
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/metrics/user_metrics_recorder.h" | 5 #include "ash/metrics/user_metrics_recorder.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "ash/common/login_status.h" | 9 #include "ash/common/login_status.h" |
10 #include "ash/common/shelf/shelf_model.h" | 10 #include "ash/common/shelf/shelf_model.h" |
11 #include "ash/common/wm_shell.h" | 11 #include "ash/common/wm_shell.h" |
12 #include "ash/shelf/shelf_util.h" | |
13 #include "ash/test/ash_test_base.h" | 12 #include "ash/test/ash_test_base.h" |
14 #include "ash/test/test_shelf_delegate.h" | 13 #include "ash/test/test_shelf_delegate.h" |
15 #include "ash/test/test_system_tray_delegate.h" | 14 #include "ash/test/test_system_tray_delegate.h" |
16 #include "ash/test/user_metrics_recorder_test_api.h" | 15 #include "ash/test/user_metrics_recorder_test_api.h" |
17 #include "base/test/histogram_tester.h" | 16 #include "base/test/histogram_tester.h" |
18 #include "ui/aura/window.h" | 17 #include "ui/aura/window.h" |
19 | 18 |
20 namespace ash { | 19 namespace ash { |
21 namespace { | 20 namespace { |
22 | 21 |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 aura::Window* unpinned_window_5 = CreateTestWindow(); | 212 aura::Window* unpinned_window_5 = CreateTestWindow(); |
214 test_shelf_delegate->AddShelfItem(unpinned_window_5); | 213 test_shelf_delegate->AddShelfItem(unpinned_window_5); |
215 | 214 |
216 user_metrics_recorder_test_api()->RecordPeriodicMetrics(); | 215 user_metrics_recorder_test_api()->RecordPeriodicMetrics(); |
217 histograms().ExpectBucketCount(kAsh_Shelf_NumberOfItems, 5, 1); | 216 histograms().ExpectBucketCount(kAsh_Shelf_NumberOfItems, 5, 1); |
218 histograms().ExpectBucketCount(kAsh_Shelf_NumberOfPinnedItems, 2, 1); | 217 histograms().ExpectBucketCount(kAsh_Shelf_NumberOfPinnedItems, 2, 1); |
219 histograms().ExpectBucketCount(kAsh_Shelf_NumberOfUnpinnedItems, 3, 1); | 218 histograms().ExpectBucketCount(kAsh_Shelf_NumberOfUnpinnedItems, 3, 1); |
220 } | 219 } |
221 | 220 |
222 } // namespace ash | 221 } // namespace ash |
OLD | NEW |