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 "chrome/browser/metrics/machine_id_provider.h"
7 #include "base/memory/ref_counted.h"
8 #include "content/public/test/test_browser_thread_bundle.h"
9 #include "testing/gtest/include/gtest/gtest.h"
13 TEST(MachineIdProviderTest
, GetId
) {
14 content::TestBrowserThreadBundle thread_bundle
;
16 scoped_refptr
<MachineIdProvider
> provider(
17 MachineIdProvider::CreateInstance());
18 std::string id1
= provider
->GetMachineId();
20 EXPECT_NE(std::string(), id1
);
22 std::string id2
= provider
->GetMachineId();
26 } // namespace metrics