OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #include "chrome/browser/prefs/tracked/device_id.h" | |
6 #include "build/build_config.h" | |
gab
2015/01/26 19:40:46
Sort.
alito
2015/01/26 21:01:11
Done.
| |
7 #include "testing/gtest/include/gtest/gtest.h" | |
8 | |
9 namespace tracked_prefs { | |
10 | |
11 TEST(GetDeterministicMachineSpecificIdTest, IsDeterministic) { | |
12 std::string first_machine_id; | |
13 std::string second_machine_id; | |
14 | |
15 const MachineIdStatus kExpectedStatus = | |
16 #if defined(OS_WIN) | |
17 SUCCESS; | |
18 #else | |
19 NOT_IMPLEMENTED; | |
20 #endif | |
21 | |
22 ASSERT_EQ(kExpectedStatus, | |
23 GetDeterministicMachineSpecificId(&first_machine_id)); | |
24 ASSERT_EQ(kExpectedStatus, | |
25 GetDeterministicMachineSpecificId(&second_machine_id)); | |
26 | |
27 EXPECT_EQ(kExpectedStatus != SUCCESS, first_machine_id.empty()); | |
gab
2015/01/26 19:40:46
I would flip this around (i.e. verify what should
alito
2015/01/26 21:01:11
Done.
| |
28 EXPECT_EQ(first_machine_id, second_machine_id); | |
29 } | |
30 | |
31 } // namespace tracked_prefs | |
OLD | NEW |