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/login_status.h" | 9 #include "ash/login_status.h" |
10 #include "ash/public/cpp/config.h" | 10 #include "ash/public/cpp/config.h" |
11 #include "ash/session/session_controller.h" | 11 #include "ash/session/session_controller.h" |
12 #include "ash/shelf/shelf_model.h" | 12 #include "ash/shelf/shelf_model.h" |
13 #include "ash/shell.h" | 13 #include "ash/shell.h" |
14 #include "ash/shell_port.h" | 14 #include "ash/shell_port.h" |
15 #include "ash/test/ash_test_base.h" | 15 #include "ash/test/ash_test_base.h" |
16 #include "ash/test/test_session_controller_client.h" | 16 #include "ash/test/test_session_controller_client.h" |
17 #include "ash/test/user_metrics_recorder_test_api.h" | 17 #include "ash/test/user_metrics_recorder_test_api.h" |
18 #include "ash/wm_window.h" | |
19 #include "base/test/histogram_tester.h" | 18 #include "base/test/histogram_tester.h" |
20 | 19 |
21 using session_manager::SessionState; | 20 using session_manager::SessionState; |
22 | 21 |
23 namespace ash { | 22 namespace ash { |
24 namespace { | 23 namespace { |
25 | 24 |
26 const char kAsh_NumberOfVisibleWindowsInPrimaryDisplay[] = | 25 const char kAsh_NumberOfVisibleWindowsInPrimaryDisplay[] = |
27 "Ash.NumberOfVisibleWindowsInPrimaryDisplay"; | 26 "Ash.NumberOfVisibleWindowsInPrimaryDisplay"; |
28 | 27 |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 shelf_item.id = ShelfID("app_id_5"); | 158 shelf_item.id = ShelfID("app_id_5"); |
160 shelf_model->Add(shelf_item); | 159 shelf_model->Add(shelf_item); |
161 | 160 |
162 test_api().RecordPeriodicMetrics(); | 161 test_api().RecordPeriodicMetrics(); |
163 histograms().ExpectBucketCount(kAsh_Shelf_NumberOfItems, 5, 1); | 162 histograms().ExpectBucketCount(kAsh_Shelf_NumberOfItems, 5, 1); |
164 histograms().ExpectBucketCount(kAsh_Shelf_NumberOfPinnedItems, 2, 1); | 163 histograms().ExpectBucketCount(kAsh_Shelf_NumberOfPinnedItems, 2, 1); |
165 histograms().ExpectBucketCount(kAsh_Shelf_NumberOfUnpinnedItems, 3, 1); | 164 histograms().ExpectBucketCount(kAsh_Shelf_NumberOfUnpinnedItems, 3, 1); |
166 } | 165 } |
167 | 166 |
168 } // namespace ash | 167 } // namespace ash |
OLD | NEW |