Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(48)

Side by Side Diff: chrome/browser/metrics/metrics_service_unittest.cc

Issue 2735005: Merge 49197 - Submitting CL http://codereview.chromium.org/2324001 on behalf ... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/418/src/
Patch Set: Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/metrics/metrics_service.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 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 #include "chrome/browser/metrics/metrics_service.h" 5 #include "chrome/browser/metrics/metrics_service.h"
6 6
7 #include <string> 7 #include <string>
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 9
10 #if defined(OS_POSIX) && defined(LINUX2) 10 #if defined(OS_POSIX) && defined(LINUX2)
11 TEST(MetricsServiceTest, ClientIdGeneratesAllZeroes) { 11 TEST(MetricsServiceTest, ClientIdGeneratesAllZeroes) {
(...skipping 14 matching lines...) Expand all
26 for (uint32 i = 0; i < clientid.length(); i++) { 26 for (uint32 i = 0; i < clientid.length(); i++) {
27 char current = clientid.at(i); 27 char current = clientid.at(i);
28 if (i == 8 || i == 13 || i == 18 || i == 23) { 28 if (i == 8 || i == 13 || i == 18 || i == 23) {
29 EXPECT_EQ('-', current); 29 EXPECT_EQ('-', current);
30 } else { 30 } else {
31 EXPECT_TRUE(std::string::npos != hexchars.find(current)); 31 EXPECT_TRUE(std::string::npos != hexchars.find(current));
32 } 32 }
33 } 33 }
34 } 34 }
35 #endif 35 #endif
36
37 #if defined(OS_CHROMEOS)
38 TEST(MetricsServiceTest, GetHardwareClass) {
39 // The assumption is that unit tests run on the build host rather
40 // than on the Chrome OS device so the hardware_class tool is not
41 // available.
42 std::string hardware_class = MetricsService::GetHardwareClass();
43 EXPECT_EQ("unknown", hardware_class);
44 }
45 #endif // OS_CHROMEOS
OLDNEW
« no previous file with comments | « chrome/browser/metrics/metrics_service.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698