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

Unified Diff: omaha_request_action_unittest.cc

Issue 6836025: Add support to update_engine to poke Omaha after an update has been applied (Closed) Base URL: http://git.chromium.org/git/update_engine.git@master
Patch Set: Change to use <ping> element with active=1 Created 9 years, 8 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
Index: omaha_request_action_unittest.cc
diff --git a/omaha_request_action_unittest.cc b/omaha_request_action_unittest.cc
index 409e947a44d5718e62681e9571267aef7c2967a2..42d58860530b759fc69524a1df899f9ee188a780 100755
--- a/omaha_request_action_unittest.cc
+++ b/omaha_request_action_unittest.cc
@@ -560,8 +560,9 @@ TEST(OmahaRequestActionTest, FormatUpdateCheckOutputTest) {
&post_data));
// convert post_data to string
string post_str(&post_data[0], post_data.size());
- EXPECT_NE(post_str.find(" <o:ping a=\"-1\" r=\"-1\"></o:ping>\n"
- " <o:updatecheck></o:updatecheck>\n"),
+ EXPECT_NE(post_str.find(
+ " <o:ping active=\"1\" 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);
@@ -584,8 +585,9 @@ TEST(OmahaRequestActionTest, FormatUpdateCheckPrevVersionOutputTest) {
&post_data));
// convert post_data to string
string post_str(&post_data[0], post_data.size());
- EXPECT_NE(post_str.find(" <o:ping a=\"-1\" r=\"-1\"></o:ping>\n"
- " <o:updatecheck></o:updatecheck>\n"),
+ EXPECT_NE(post_str.find(
+ " <o:ping active=\"1\" 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);
@@ -727,7 +729,8 @@ TEST(OmahaRequestActionTest, PingTest) {
NULL,
&post_data));
string post_str(&post_data[0], post_data.size());
- EXPECT_NE(post_str.find("<o:ping a=\"6\" r=\"5\"></o:ping>"), string::npos);
+ EXPECT_NE(post_str.find("<o:ping active=\"1\" a=\"6\" r=\"5\"></o:ping>"),
+ string::npos);
}
TEST(OmahaRequestActionTest, ActivePingTest) {
@@ -749,7 +752,8 @@ TEST(OmahaRequestActionTest, ActivePingTest) {
NULL,
&post_data));
string post_str(&post_data[0], post_data.size());
- EXPECT_NE(post_str.find("<o:ping a=\"3\"></o:ping>"), string::npos);
+ EXPECT_NE(post_str.find("<o:ping active=\"1\" a=\"3\"></o:ping>"),
+ string::npos);
}
TEST(OmahaRequestActionTest, RollCallPingTest) {
@@ -771,7 +775,8 @@ TEST(OmahaRequestActionTest, RollCallPingTest) {
NULL,
&post_data));
string post_str(&post_data[0], post_data.size());
- EXPECT_NE(post_str.find("<o:ping r=\"4\"></o:ping>\n"), string::npos);
+ EXPECT_NE(post_str.find("<o:ping active=\"1\" r=\"4\"></o:ping>\n"),
+ string::npos);
}
TEST(OmahaRequestActionTest, NoPingTest) {

Powered by Google App Engine
This is Rietveld 408576698