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

Side by Side Diff: services/preferences/tracked/device_id_unittest.cc

Issue 2782803002: Move tracked prefs into services/preferences/tracked. (Closed)
Patch Set: rebase Created 3 years, 8 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
OLDNEW
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 "components/user_prefs/tracked/device_id.h" 5 #include "services/preferences/tracked/device_id.h"
6 6
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 9
10 TEST(GetDeterministicMachineSpecificIdTest, IsDeterministic) { 10 TEST(GetDeterministicMachineSpecificIdTest, IsDeterministic) {
11 std::string first_machine_id; 11 std::string first_machine_id;
12 std::string second_machine_id; 12 std::string second_machine_id;
13 13
14 const MachineIdStatus kExpectedStatus = 14 const MachineIdStatus kExpectedStatus =
15 #if defined(OS_WIN) || (defined(OS_MACOSX) && !defined(OS_IOS)) 15 #if defined(OS_WIN) || (defined(OS_MACOSX) && !defined(OS_IOS))
(...skipping 10 matching lines...) Expand all
26 // The reason for using |EXPECT_TRUE| with one argument instead of |EXPECT_EQ| 26 // The reason for using |EXPECT_TRUE| with one argument instead of |EXPECT_EQ|
27 // with two arguments is a compiler bug in gcc that results in a "converting 27 // with two arguments is a compiler bug in gcc that results in a "converting
28 // 'false' to pointer type" error when the first argument to |EXPECT_EQ| is a 28 // 'false' to pointer type" error when the first argument to |EXPECT_EQ| is a
29 // compile-time const false value. See also the following bug reports: 29 // compile-time const false value. See also the following bug reports:
30 // https://code.google.com/p/googletest/issues/detail?id=322 30 // https://code.google.com/p/googletest/issues/detail?id=322
31 // https://code.google.com/p/googletest/issues/detail?id=458 31 // https://code.google.com/p/googletest/issues/detail?id=458
32 EXPECT_TRUE((kExpectedStatus == MachineIdStatus::SUCCESS) == 32 EXPECT_TRUE((kExpectedStatus == MachineIdStatus::SUCCESS) ==
33 !first_machine_id.empty()); 33 !first_machine_id.empty());
34 EXPECT_EQ(first_machine_id, second_machine_id); 34 EXPECT_EQ(first_machine_id, second_machine_id);
35 } 35 }
OLDNEW
« no previous file with comments | « services/preferences/tracked/device_id_stub.cc ('k') | services/preferences/tracked/device_id_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698