AU: XmlEncode the previous version, just in case.
BUG=9198
TEST=unit tests
Change-Id: I5ae497fa4c318645ac07ee6fcef6dad9b276606f
Review URL: http://codereview.chromium.org/6253002
diff --git a/omaha_request_action_unittest.cc b/omaha_request_action_unittest.cc
index 8082e15..7e67555 100755
--- a/omaha_request_action_unittest.cc
+++ b/omaha_request_action_unittest.cc
@@ -546,7 +546,7 @@
vector<char> post_data;
NiceMock<PrefsMock> prefs;
EXPECT_CALL(prefs, GetString(kPrefsPreviousVersion, _))
- .WillOnce(DoAll(SetArgumentPointee<1>(string("1.2.3.4")), Return(true)));
+ .WillOnce(DoAll(SetArgumentPointee<1>(string("1.2>3.4")), Return(true)));
EXPECT_CALL(prefs, SetString(kPrefsPreviousVersion, ""))
.WillOnce(Return(true));
ASSERT_FALSE(TestUpdateCheck(&prefs,
@@ -565,7 +565,7 @@
string::npos);
string prev_version_event = StringPrintf(
" <o:event eventtype=\"%d\" eventresult=\"%d\" "
- "previousversion=\"1.2.3.4\"></o:event>\n",
+ "previousversion=\"1.2>3.4\"></o:event>\n",
OmahaEvent::kTypeUpdateComplete,
OmahaEvent::kResultSuccessReboot);
EXPECT_NE(post_str.find(prev_version_event), string::npos);