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

Unified Diff: omaha_request_params_unittest.cc

Issue 5022001: AU: Allow override of "appid" through the lsb-release file. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/update_engine.git@master
Patch Set: Created 10 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 | « omaha_request_params.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: omaha_request_params_unittest.cc
diff --git a/omaha_request_params_unittest.cc b/omaha_request_params_unittest.cc
index 65d86cbc3de87f940cd92c111ba76556ff95a29b..77d01d2ce7435f8325b5278aaf09430e45dce748 100644
--- a/omaha_request_params_unittest.cc
+++ b/omaha_request_params_unittest.cc
@@ -96,6 +96,29 @@ TEST_F(OmahaRequestDeviceParamsTest, SimpleTest) {
EXPECT_EQ("http://www.google.com", out.update_url);
}
+TEST_F(OmahaRequestDeviceParamsTest, AppIDTest) {
+ ASSERT_TRUE(WriteFileString(
+ kTestDir + "/etc/lsb-release",
+ "CHROMEOS_RELEASE_BOARD=arm-generic\n"
+ "CHROMEOS_RELEASE_FOO=bar\n"
+ "CHROMEOS_RELEASE_VERSION=0.2.2.3\n"
+ "CHROMEOS_RELEASE_TRACK=footrack\n"
+ "CHROMEOS_RELEASE_APPID={58c35cef-9d30-476e-9098-ce20377d535d}\n"
+ "CHROMEOS_AUSERVER=http://www.google.com"));
+ OmahaRequestParams out;
+ EXPECT_TRUE(DoTest(&out, "", ""));
+ EXPECT_EQ("Chrome OS", out.os_platform);
+ EXPECT_EQ(string("0.2.2.3_") + GetMachineType(), out.os_sp);
+ EXPECT_EQ("arm-generic", out.os_board);
+ EXPECT_EQ("{58c35cef-9d30-476e-9098-ce20377d535d}", out.app_id);
+ EXPECT_EQ("0.2.2.3", out.app_version);
+ EXPECT_EQ("en-US", out.app_lang);
+ EXPECT_EQ("", out.hardware_class);
+ EXPECT_TRUE(out.delta_okay);
+ EXPECT_EQ("footrack", out.app_track);
+ EXPECT_EQ("http://www.google.com", out.update_url);
+}
+
TEST_F(OmahaRequestDeviceParamsTest, MissingTrackTest) {
ASSERT_TRUE(WriteFileString(
kTestDir + "/etc/lsb-release",
« no previous file with comments | « omaha_request_params.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698