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

Unified Diff: components/update_client/utils_unittest.cc

Issue 1606943007: Implement Windows GPO support for "dlpref" in component updater. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: whitespace comments only Created 4 years, 11 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: components/update_client/utils_unittest.cc
diff --git a/components/update_client/utils_unittest.cc b/components/update_client/utils_unittest.cc
new file mode 100644
index 0000000000000000000000000000000000000000..fa32ffb1a49d51e48b91c95d0d64b4dfa6f450e5
--- /dev/null
+++ b/components/update_client/utils_unittest.cc
@@ -0,0 +1,27 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "components/update_client/utils.h"
+#include "testing/gtest/include/gtest/gtest.h"
+#include "url/gurl.h"
+
+using std::string;
+
+namespace update_client {
+
+TEST(BuildProtocolRequest, DownloadPreference) {
+ const string emptystr;
+
+ // Verifies that an empty |download_preference| is not serialized.
+ const string request_no_dlpref = BuildProtocolRequest(
+ emptystr, emptystr, emptystr, emptystr, emptystr, emptystr, emptystr);
+ 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);
+ EXPECT_NE(string::npos, request_with_dlpref.find(" dlpref=\"some pref\""));
+}
+
+} // namespace update_client
« no previous file with comments | « components/update_client/utils.cc ('k') | ios/chrome/browser/component_updater/ios_component_updater_configurator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698