| Index: chrome/browser/prefs/tracked/device_id_unittest.cc
|
| diff --git a/chrome/browser/prefs/tracked/device_id_unittest.cc b/chrome/browser/prefs/tracked/device_id_unittest.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..3a03b0677e6f93c562b88660f05b80f4422f4c10
|
| --- /dev/null
|
| +++ b/chrome/browser/prefs/tracked/device_id_unittest.cc
|
| @@ -0,0 +1,32 @@
|
| +// Copyright 2015 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "build/build_config.h"
|
| +#include "chrome/browser/prefs/tracked/device_id.h"
|
| +#include "testing/gtest/include/gtest/gtest.h"
|
| +
|
| +namespace tracked_prefs {
|
| +
|
| +TEST(GetDeterministicMachineSpecificIdTest, IsDeterministic) {
|
| + std::string first_machine_id;
|
| + std::string second_machine_id;
|
| +
|
| + const MachineIdStatus kExpectedStatus =
|
| +#if defined(OS_WIN)
|
| + MachineIdStatus::SUCCESS;
|
| +#else
|
| + MachineIdStatus::NOT_IMPLEMENTED;
|
| +#endif
|
| +
|
| + ASSERT_EQ(kExpectedStatus,
|
| + GetDeterministicMachineSpecificId(&first_machine_id));
|
| + ASSERT_EQ(kExpectedStatus,
|
| + GetDeterministicMachineSpecificId(&second_machine_id));
|
| +
|
| + EXPECT_EQ(kExpectedStatus == MachineIdStatus::SUCCESS,
|
| + !first_machine_id.empty());
|
| + EXPECT_EQ(first_machine_id, second_machine_id);
|
| +}
|
| +
|
| +} // namespace tracked_prefs
|
|
|