Parse and add manifest version to the Omaha Response object.
This CL adds the version of the update we're updating to to the Omaha
response object and removes the use of DisplayVersion. DisplayVersion is
from the Omaha Protocol v1, and v2 and has never been used or relied
upon in the update engine.
Protocol is described here:
https://code.google.com/p/omaha/wiki/ServerProtocol
Manifest version should always describe the version of the application we are
updating to as is described by the manifest.
BUG=chromium:252527
TEST=Unittests + devserver image_to_live test.
Change-Id: I9afaa8af3c21813f19d88abf437f35b024d31985
Reviewed-on: https://gerrit.chromium.org/gerrit/59498
Reviewed-by: Chris Sosa <sosa@chromium.org>
Tested-by: Chris Sosa <sosa@chromium.org>
Commit-Queue: Chris Sosa <sosa@chromium.org>
diff --git a/omaha_response_handler_action_unittest.cc b/omaha_response_handler_action_unittest.cc
index ae8fccb..3516cd6 100644
--- a/omaha_response_handler_action_unittest.cc
+++ b/omaha_response_handler_action_unittest.cc
@@ -112,7 +112,7 @@
{
OmahaResponse in;
in.update_exists = true;
- in.display_version = "a.b.c.d";
+ in.version = "a.b.c.d";
in.payload_urls.push_back("http://foo/the_update_a.b.c.d.tgz");
in.more_info_url = "http://more/info";
in.hash = "HASH+";
@@ -138,7 +138,7 @@
{
OmahaResponse in;
in.update_exists = true;
- in.display_version = "a.b.c.d";
+ in.version = "a.b.c.d";
in.payload_urls.push_back("http://foo/the_update_a.b.c.d.tgz");
in.more_info_url = "http://more/info";
in.hash = "HASHj+";
@@ -157,7 +157,7 @@
{
OmahaResponse in;
in.update_exists = true;
- in.display_version = "a.b.c.d";
+ in.version = "a.b.c.d";
in.payload_urls.push_back(kLongName);
in.more_info_url = "http://more/info";
in.hash = "HASHj+";
@@ -190,7 +190,7 @@
TEST_F(OmahaResponseHandlerActionTest, HashChecksForHttpTest) {
OmahaResponse in;
in.update_exists = true;
- in.display_version = "a.b.c.d";
+ in.version = "a.b.c.d";
in.payload_urls.push_back("http://test.should/need/hash.checks.signed");
in.more_info_url = "http://more/info";
in.hash = "HASHj+";
@@ -205,7 +205,7 @@
TEST_F(OmahaResponseHandlerActionTest, HashChecksForHttpsTest) {
OmahaResponse in;
in.update_exists = true;
- in.display_version = "a.b.c.d";
+ in.version = "a.b.c.d";
in.payload_urls.push_back("https://test.should.not/need/hash.checks.signed");
in.more_info_url = "http://more/info";
in.hash = "HASHj+";
@@ -220,7 +220,7 @@
TEST_F(OmahaResponseHandlerActionTest, HashChecksForBothHttpAndHttpsTest) {
OmahaResponse in;
in.update_exists = true;
- in.display_version = "a.b.c.d";
+ in.version = "a.b.c.d";
in.payload_urls.push_back("http://test.should.still/need/hash.checks");
in.payload_urls.push_back("https://test.should.still/need/hash.checks");
in.more_info_url = "http://more/info";
@@ -236,7 +236,7 @@
TEST_F(OmahaResponseHandlerActionTest, ChangeToMoreStableChannelTest) {
OmahaResponse in;
in.update_exists = true;
- in.display_version = "a.b.c.d";
+ in.version = "a.b.c.d";
in.payload_urls.push_back("https://MoreStableChannelTest");
in.more_info_url = "http://more/info";
in.hash = "HASHjk";
@@ -273,7 +273,7 @@
TEST_F(OmahaResponseHandlerActionTest, ChangeToLessStableChannelTest) {
OmahaResponse in;
in.update_exists = true;
- in.display_version = "a.b.c.d";
+ in.version = "a.b.c.d";
in.payload_urls.push_back("https://LessStableChannelTest");
in.more_info_url = "http://more/info";
in.hash = "HASHjk";