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

Side by Side Diff: chrome/browser/prefs/tracked/device_id_unittest.cc

Issue 836703005: Add a new function for getting a deterministic machine ID (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Created 5 years, 11 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
(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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698