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.
5 #include "components/metrics/machine_id_provider.h"
7 #include "base/memory/ref_counted.h"
8 #include "base/win/windows_version.h"
9 #include "testing/gtest/include/gtest/gtest.h"
13 TEST(MachineIdProviderTest
, GetId
) {
14 scoped_refptr
<MachineIdProvider
> provider(
15 MachineIdProvider::CreateInstance());
16 std::string id1
= provider
->GetMachineId();
18 // TODO(rpaquay): See crbug/458230
19 if (base::win::GetVersion() <= base::win::VERSION_XP
)
22 EXPECT_NE(std::string(), id1
);
24 std::string id2
= provider
->GetMachineId();
28 } // namespace metrics