#include "components/sync_device_info/local_device_info_util.h"
#include <utility>
#include "base/system/sys_info.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "testing/gtest/include/gtest/gtest.h"
#if BUILDFLAG(IS_CHROMEOS_ASH)
#include "base/command_line.h"
#include "base/test/scoped_chromeos_version_info.h"
#endif
namespace syncer {
namespace {
TEST(GetClientNameTest, GetPersonalizableDeviceNameBlocking) { … }
#if BUILDFLAG(IS_CHROMEOS_ASH)
TEST(GetClientNameTest, GetPersonalizableDeviceNameBlockingChromebook) {
const char* kLsbRelease = "DEVICETYPE=CHROMEBOOK\n";
base::test::ScopedChromeOSVersionInfo version(kLsbRelease, base::Time());
const std::string& client_name = GetPersonalizableDeviceNameBlocking();
EXPECT_EQ("Chromebook", client_name);
}
TEST(GetClientNameTest, GetPersonalizableDeviceNameBlockingChromebox) {
const char* kLsbRelease = "DEVICETYPE=CHROMEBOX\n";
base::test::ScopedChromeOSVersionInfo version(kLsbRelease, base::Time());
const std::string& client_name = GetPersonalizableDeviceNameBlocking();
EXPECT_EQ("Chromebox", client_name);
}
#endif
}
}