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

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, 10 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 "build/build_config.h"
6 #include "chrome/browser/prefs/tracked/device_id.h"
grt (UTC plus 2) 2015/01/27 21:08:45 move above line 5 with a blank line after it
gab 2015/01/27 21:20:30 Interesting, I've heard the opposite (and am the o
Alexei Svitkine (slow) 2015/01/27 22:45:44 I believe the recommended style in Chromium is now
7 #include "testing/gtest/include/gtest/gtest.h"
8
9 TEST(GetDeterministicMachineSpecificIdTest, IsDeterministic) {
10 std::string first_machine_id;
11 std::string second_machine_id;
12
13 const MachineIdStatus kExpectedStatus =
14 #if defined(OS_WIN)
15 MachineIdStatus::SUCCESS;
16 #else
17 MachineIdStatus::NOT_IMPLEMENTED;
18 #endif
19
20 ASSERT_EQ(kExpectedStatus,
21 GetDeterministicMachineSpecificId(&first_machine_id));
22 ASSERT_EQ(kExpectedStatus,
23 GetDeterministicMachineSpecificId(&second_machine_id));
24
25 EXPECT_EQ(kExpectedStatus == MachineIdStatus::SUCCESS,
26 !first_machine_id.empty());
27 EXPECT_EQ(first_machine_id, second_machine_id);
28 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698