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 "chrome/browser/metrics/metrics_service.h" | 5 #include "chrome/browser/metrics/metrics_service.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/base64.h" | 9 #include "base/base64.h" |
10 | 10 |
(...skipping 10 matching lines...) Expand all Loading... |
21 for (uint32 i = 0; i < clientid.length(); i++) { | 21 for (uint32 i = 0; i < clientid.length(); i++) { |
22 char current = clientid.at(i); | 22 char current = clientid.at(i); |
23 if (i == 8 || i == 13 || i == 18 || i == 23) { | 23 if (i == 8 || i == 13 || i == 18 || i == 23) { |
24 EXPECT_EQ('-', current); | 24 EXPECT_EQ('-', current); |
25 } else { | 25 } else { |
26 EXPECT_TRUE(std::string::npos != hexchars.find(current)); | 26 EXPECT_TRUE(std::string::npos != hexchars.find(current)); |
27 } | 27 } |
28 } | 28 } |
29 } | 29 } |
30 | 30 |
| 31 TEST(MetricsServiceTest, IsPluginProcess) { |
| 32 EXPECT_TRUE( |
| 33 MetricsService::IsPluginProcess(ChildProcessInfo::PLUGIN_PROCESS)); |
| 34 EXPECT_TRUE( |
| 35 MetricsService::IsPluginProcess(ChildProcessInfo::PPAPI_PLUGIN_PROCESS)); |
| 36 EXPECT_FALSE( |
| 37 MetricsService::IsPluginProcess(ChildProcessInfo::GPU_PROCESS)); |
| 38 } |
OLD | NEW |