Chromium Code Reviews| 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 "testing/gtest/include/gtest/gtest.h" | |
| 7 | |
| 8 TEST(GetDeterministicMachineSpecificIdTest, IsDeterministic) { | |
| 9 std::string first_machine_id; | |
| 10 std::string second_machine_id; | |
| 11 | |
| 12 bool machine_id_enabled = false; | |
| 13 #if defined(OS_WIN) | |
| 14 machine_id_enabled = true; | |
| 15 #endif | |
|
gab
2015/01/20 15:34:12
This will likely change based on other comments, b
alito
2015/01/26 16:32:48
Acknowledged.
| |
| 16 | |
| 17 ASSERT_EQ(machine_id_enabled, | |
| 18 GetDeterministicMachineSpecificId(&first_machine_id)); | |
| 19 ASSERT_EQ(machine_id_enabled, | |
| 20 GetDeterministicMachineSpecificId(&second_machine_id)); | |
| 21 if (!machine_id_enabled) { | |
| 22 EXPECT_EQ(string(""), first_machine_id); | |
|
gab
2015/01/20 15:34:12
I think this test will change based on other comme
alito
2015/01/26 16:32:48
Acknowledged.
| |
| 23 } | |
| 24 EXPECT_EQ(first_machine_id, second_machine_id); | |
| 25 } | |
| OLD | NEW |