1// Copyright 2014 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 "components/metrics/machine_id_provider.h"
6
7#include "base/memory/ref_counted.h"
8#include "testing/gtest/include/gtest/gtest.h"
9
10namespace metrics {
11
12TEST(MachineIdProviderTest, GetId) {
13  scoped_refptr<MachineIdProvider> provider(
14      MachineIdProvider::CreateInstance());
15  std::string id1 = provider->GetMachineId();
16
17  EXPECT_NE(std::string(), id1);
18
19  std::string id2 = provider->GetMachineId();
20  EXPECT_EQ(id1, id2);
21}
22
23}  // namespace metrics
24