| Index: components/update_client/utils_unittest.cc
|
| diff --git a/components/update_client/utils_unittest.cc b/components/update_client/utils_unittest.cc
|
| index 4609b7f656f61b7234347736695e585f859631fb..9370a879b0633cb4500e46735bfd5f251d0781da 100644
|
| --- a/components/update_client/utils_unittest.cc
|
| +++ b/components/update_client/utils_unittest.cc
|
| @@ -23,17 +23,22 @@ base::FilePath MakeTestFilePath(const char* file) {
|
|
|
| namespace update_client {
|
|
|
| -TEST(UpdateClientUtils, BuildProtocolRequest_DownloadPreference) {
|
| - const string emptystr;
|
| +TEST(UpdateClientUtils, BuildProtocolRequest_ProdIdVersion) {
|
| + // Verifies that |prod_id| and |version| are serialized.
|
| + const string request =
|
| + BuildProtocolRequest("some_prod_id", "1.0", "", "", "", "", "", "");
|
| + EXPECT_NE(string::npos, request.find(" version=\"some_prod_id-1.0\" "));
|
| +}
|
|
|
| +TEST(UpdateClientUtils, BuildProtocolRequest_DownloadPreference) {
|
| // Verifies that an empty |download_preference| is not serialized.
|
| - const string request_no_dlpref = BuildProtocolRequest(
|
| - emptystr, emptystr, emptystr, emptystr, emptystr, emptystr, emptystr);
|
| + const string request_no_dlpref =
|
| + BuildProtocolRequest("", "", "", "", "", "", "", "");
|
| EXPECT_EQ(string::npos, request_no_dlpref.find(" dlpref="));
|
|
|
| // Verifies that |download_preference| is serialized.
|
| - const string request_with_dlpref = BuildProtocolRequest(
|
| - emptystr, emptystr, emptystr, emptystr, "some pref", emptystr, emptystr);
|
| + const string request_with_dlpref =
|
| + BuildProtocolRequest("", "", "", "", "", "some pref", "", "");
|
| EXPECT_NE(string::npos, request_with_dlpref.find(" dlpref=\"some pref\""));
|
| }
|
|
|
|
|