OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "ppapi/tests/test_uma.h" | 5 #include "ppapi/tests/test_uma.h" |
6 | 6 |
7 #include "ppapi/c/private/ppb_uma_private.h" | |
8 #include "ppapi/cpp/instance.h" | 7 #include "ppapi/cpp/instance.h" |
9 #include "ppapi/cpp/module.h" | 8 #include "ppapi/cpp/module.h" |
10 #include "ppapi/tests/testing_instance.h" | 9 #include "ppapi/tests/testing_instance.h" |
11 | 10 |
12 REGISTER_TEST_CASE(UMA); | 11 REGISTER_TEST_CASE(UMA); |
13 | 12 |
14 bool TestUMA::Init() { | 13 bool TestUMA::Init() { |
15 uma_interface_ = static_cast<const PPB_UMA_Private*>( | 14 uma_interface_ = static_cast<const PPB_UMA_Private*>( |
16 pp::Module::Get()->GetBrowserInterface(PPB_UMA_PRIVATE_INTERFACE)); | 15 pp::Module::Get()->GetBrowserInterface(PPB_UMA_PRIVATE_INTERFACE)); |
17 return !!uma_interface_; | 16 return !!uma_interface_; |
(...skipping 29 matching lines...) Expand all Loading... |
47 pp::Var name_var = pp::Var("Test.EnumHistogram"); | 46 pp::Var name_var = pp::Var("Test.EnumHistogram"); |
48 PP_Var name = name_var.pp_var(); | 47 PP_Var name = name_var.pp_var(); |
49 uma_interface_->HistogramEnumeration(name, 0, 5); | 48 uma_interface_->HistogramEnumeration(name, 0, 5); |
50 uma_interface_->HistogramEnumeration(name, 3, 5); | 49 uma_interface_->HistogramEnumeration(name, 3, 5); |
51 uma_interface_->HistogramEnumeration(name, 3, 5); | 50 uma_interface_->HistogramEnumeration(name, 3, 5); |
52 uma_interface_->HistogramEnumeration(name, 1, 5); | 51 uma_interface_->HistogramEnumeration(name, 1, 5); |
53 uma_interface_->HistogramEnumeration(name, 2, 5); | 52 uma_interface_->HistogramEnumeration(name, 2, 5); |
54 PASS(); | 53 PASS(); |
55 } | 54 } |
56 | 55 |
OLD | NEW |