OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 // Unit tests for the CEEE metrics utilities. | 5 // Unit tests for the CEEE metrics utilities. |
6 | 6 |
7 #include <atlconv.h> | 7 #include <atlconv.h> |
8 | 8 |
9 #include "ceee/ie/common/metrics_util.h" | 9 #include "ceee/ie/common/metrics_util.h" |
10 | 10 |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 // values to the ScopedTimer will indeed fail. | 51 // values to the ScopedTimer will indeed fail. |
52 } | 52 } |
53 | 53 |
54 | 54 |
55 // Test for successful uses of the ScopedTimer. | 55 // Test for successful uses of the ScopedTimer. |
56 TEST_F(CeeeMetricsUtilTest, ScopedTimerSuccess) { | 56 TEST_F(CeeeMetricsUtilTest, ScopedTimerSuccess) { |
57 testing::LogDisabler no_dcheck; | 57 testing::LogDisabler no_dcheck; |
58 | 58 |
59 // Test that timing is right. This should ultimately succeed. | 59 // Test that timing is right. This should ultimately succeed. |
60 // We expect less than a couple milliseconds on this call. | 60 // We expect less than a couple milliseconds on this call. |
61 testing::MockBrokerRpcClient broker_rpc; | 61 testing::MockBrokerRpcClient broker_rpc(false); |
62 EXPECT_CALL(broker_rpc, SendUmaHistogramTimes(_, testing::Lt(10))); | 62 EXPECT_CALL(broker_rpc, SendUmaHistogramTimes(_, testing::Lt(10))); |
63 CreateAndDestroyTimer(&broker_rpc); | 63 CreateAndDestroyTimer(&broker_rpc); |
64 } | 64 } |
65 | 65 |
66 } // namespace | 66 } // namespace |
OLD | NEW |