Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3194)

Unified Diff: base/sys_info_unittest.cc

Issue 2489853002: Added function to provide the short board name of the device (Closed)
Patch Set: Nit Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/sys_info_chromeos.cc ('k') | components/metrics/drive_metrics_provider_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/sys_info_unittest.cc
diff --git a/base/sys_info_unittest.cc b/base/sys_info_unittest.cc
index 0231df637986e7f60494295c57f0801195552b98..c3b85077071a8ead6a263947fc109e374516a761 100644
--- a/base/sys_info_unittest.cc
+++ b/base/sys_info_unittest.cc
@@ -156,4 +156,14 @@ TEST_F(SysInfoTest, IsRunningOnChromeOS) {
EXPECT_TRUE(base::SysInfo::IsRunningOnChromeOS());
}
+TEST_F(SysInfoTest, GetStrippedReleaseBoard) {
+ const char* kLsbRelease1 = "CHROMEOS_RELEASE_BOARD=Glimmer\n";
+ base::SysInfo::SetChromeOSVersionInfoForTest(kLsbRelease1, base::Time());
+ EXPECT_EQ("glimmer", base::SysInfo::GetStrippedReleaseBoard());
+
+ const char* kLsbRelease2 = "CHROMEOS_RELEASE_BOARD=glimmer-signed-mp-v4keys";
+ base::SysInfo::SetChromeOSVersionInfoForTest(kLsbRelease2, base::Time());
+ EXPECT_EQ("glimmer", base::SysInfo::GetStrippedReleaseBoard());
+}
+
#endif // OS_CHROMEOS
« no previous file with comments | « base/sys_info_chromeos.cc ('k') | components/metrics/drive_metrics_provider_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698