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

Unified Diff: chrome/browser/component_updater/chrome_component_updater_configurator_unittest.cc

Issue 2340113002: Inject the prodid for the extensions and component updaters. (Closed)
Patch Set: Fix iOS broken build. Created 4 years, 3 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: chrome/browser/component_updater/chrome_component_updater_configurator_unittest.cc
diff --git a/chrome/browser/component_updater/chrome_component_updater_configurator_unittest.cc b/chrome/browser/component_updater/chrome_component_updater_configurator_unittest.cc
index eb46484fc7ee568e95101dbacd810476931d6663..378bdf761efaba3a4a19259e63353fda80f71259 100644
--- a/chrome/browser/component_updater/chrome_component_updater_configurator_unittest.cc
+++ b/chrome/browser/component_updater/chrome_component_updater_configurator_unittest.cc
@@ -15,6 +15,7 @@
#include "components/component_updater/configurator_impl.h"
#include "components/prefs/testing_pref_service.h"
#include "components/update_client/configurator.h"
+#include "components/update_client/update_query_params.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"
@@ -175,4 +176,13 @@ TEST_F(ChromeComponentUpdaterConfiguratorTest, TestEnabledComponentUpdates) {
EXPECT_TRUE(config->EnabledComponentUpdates());
}
+TEST_F(ChromeComponentUpdaterConfiguratorTest, TestProdId) {
+ base::CommandLine cmdline(*base::CommandLine::ForCurrentProcess());
+ const auto config(MakeChromeComponentUpdaterConfigurator(&cmdline, nullptr,
+ pref_service()));
+ EXPECT_STREQ(update_client::UpdateQueryParams::GetProdIdString(
+ update_client::UpdateQueryParams::ProdId::CHROME),
+ config->GetProdId().c_str());
+}
+
} // namespace component_updater

Powered by Google App Engine
This is Rietveld 408576698