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

Unified Diff: components/update_client/update_response_unittest.cc

Issue 2700733002: Mechanical refactoring of the parser and ActionUpdateCheck (Closed)
Patch Set: . Created 3 years, 10 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 | « components/update_client/update_response.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/update_client/update_response_unittest.cc
diff --git a/components/update_client/update_response_unittest.cc b/components/update_client/update_response_unittest.cc
index bb7010c89393eb9456adb101110c03cae0a5944a..d29cbe0d5961194c5a8508f43ae6f332d7ffba51 100644
--- a/components/update_client/update_response_unittest.cc
+++ b/components/update_client/update_response_unittest.cc
@@ -204,7 +204,7 @@ const char* kTwoAppsOneError =
"<?xml version='1.0' encoding='UTF-8'?>"
"<response protocol='3.0'>"
" <app appid='aaaaaaaa' status='error-unknownApplication'>"
- " <updatecheck status='error-unknownapplication'/>"
+ " <updatecheck status='error-internal'/>"
" </app>"
" <app appid='bbbbbbbb'>"
" <updatecheck status='ok'>"
@@ -277,6 +277,7 @@ TEST(ComponentUpdaterUpdateResponseTest, TestParser) {
EXPECT_TRUE(parser.errors().empty());
EXPECT_EQ(1u, parser.results().list.size());
const UpdateResponse::Result* firstResult = &parser.results().list[0];
+ EXPECT_STREQ("ok", firstResult->status.c_str());
EXPECT_EQ(1u, firstResult->crx_urls.size());
EXPECT_EQ(GURL("http://example.com/"), firstResult->crx_urls[0]);
EXPECT_EQ(GURL("http://diff.example.com/"), firstResult->crx_diffurls[0]);
@@ -324,6 +325,7 @@ TEST(ComponentUpdaterUpdateResponseTest, TestParser) {
EXPECT_TRUE(parser.errors().empty());
EXPECT_FALSE(parser.results().list.empty());
firstResult = &parser.results().list[0];
+ EXPECT_STREQ("noupdate", firstResult->status.c_str());
EXPECT_EQ(firstResult->extension_id, "12345");
EXPECT_EQ(firstResult->manifest.version, "");
@@ -333,6 +335,8 @@ TEST(ComponentUpdaterUpdateResponseTest, TestParser) {
EXPECT_EQ(1u, parser.results().list.size());
firstResult = &parser.results().list[0];
EXPECT_EQ(firstResult->extension_id, "bbbbbbbb");
+ EXPECT_STREQ("ok", firstResult->status.c_str());
+ EXPECT_EQ("1.2.3.4", firstResult->manifest.version);
// Parse xml with two apps setting the cohort info.
EXPECT_TRUE(parser.Parse(kTwoAppsSetCohort));
« no previous file with comments | « components/update_client/update_response.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698