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

Unified Diff: omaha_request_action_unittest.cc

Issue 3007020: Add a hardware_class attribute (for HWID, HWQual ID) to the Omaha request. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/update_engine.git
Patch Set: fix typo Created 10 years, 5 months 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_action.cc ('k') | omaha_request_params.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: omaha_request_action_unittest.cc
diff --git a/omaha_request_action_unittest.cc b/omaha_request_action_unittest.cc
index f4dcd1e9050077304e268707ab71e64129afb8dd..7a56b418d3c753aaff867d229202a7b22aea815b 100755
--- a/omaha_request_action_unittest.cc
+++ b/omaha_request_action_unittest.cc
@@ -43,6 +43,7 @@ const OmahaRequestParams kDefaultTestParams(
"0.1.0.0",
"en-US",
"unittest",
+ "OEM MODEL 09235 7471",
false, // delta okay
"http://url");
@@ -412,6 +413,7 @@ TEST(OmahaRequestActionTest, XmlEncodeTest) {
"0.1.0.0",
"en-US",
"unittest_track<",
+ "<OEM MODEL>",
false, // delta okay
"http://url");
OmahaResponse response;
@@ -430,6 +432,8 @@ TEST(OmahaRequestActionTest, XmlEncodeTest) {
EXPECT_EQ(post_str.find("x86 generic<id"), string::npos);
EXPECT_NE(post_str.find("unittest_track&amp;lt;"), string::npos);
EXPECT_EQ(post_str.find("unittest_track&lt;"), string::npos);
+ EXPECT_NE(post_str.find("&lt;OEM MODEL&gt;"), string::npos);
+ EXPECT_EQ(post_str.find("<OEM MODEL>"), string::npos);
}
TEST(OmahaRequestActionTest, XmlDecodeTest) {
@@ -487,6 +491,8 @@ TEST(OmahaRequestActionTest, FormatUpdateCheckOutputTest) {
EXPECT_NE(post_str.find(" <o:ping a=\"-1\" r=\"-1\"></o:ping>\n"
" <o:updatecheck></o:updatecheck>\n"),
string::npos);
+ EXPECT_NE(post_str.find("hardware_class=\"OEM MODEL 09235 7471\""),
+ string::npos);
EXPECT_EQ(post_str.find("o:event"), string::npos);
}
@@ -580,6 +586,7 @@ TEST(OmahaRequestActionTest, FormatDeltaOkayOutputTest) {
"0.1.0.0",
"en-US",
"unittest_track",
+ "OEM MODEL REV 1234",
delta_okay,
"http://url");
ASSERT_FALSE(TestUpdateCheck(NULL, // prefs
« no previous file with comments | « omaha_request_action.cc ('k') | omaha_request_params.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698