Home | History | Annotate | Download | only in lib
      1 // Copyright (c) 2012 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 "rlz/lib/machine_id.h"
      6 
      7 #include "base/strings/string16.h"
      8 #include "base/strings/utf_string_conversions.h"
      9 #include "rlz/test/rlz_test_helpers.h"
     10 #include "testing/gtest/include/gtest/gtest.h"
     11 
     12 // This test will fail if the behavior of GetMachineId changes.
     13 TEST(MachineDealCodeTestMachineId, MachineId) {
     14   string16 computer_sid(UTF8ToUTF16(
     15         "S-1-5-21-2345599882-2448789067-1921365677"));
     16   std::string id;
     17   rlz_lib::testing::GetMachineIdImpl(computer_sid, 2651229008, &id);
     18   EXPECT_STREQ("A341BA986A7E86840688977FCF20C86E253F00919E068B50F8",
     19                id.c_str());
     20 }
     21