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

Side by Side Diff: chrome/browser/omaha_client/chrome_omaha_query_params_delegate_unittest.cc

Issue 803313003: Rename omaha_client and similar tokens to update_client in all contexts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: rebase to master Created 5 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "base/strings/stringprintf.h"
6 #include "chrome/browser/omaha_client/chrome_omaha_query_params_delegate.h"
7 #include "chrome/common/chrome_version_info.h"
8 #include "components/omaha_client/omaha_query_params.h"
9 #include "testing/gtest/include/gtest/gtest.h"
10
11 using base::StringPrintf;
12
13 namespace {
14
15 bool Contains(const std::string& source, const std::string& target) {
16 return source.find(target) != std::string::npos;
17 }
18
19 } // namespace
20
21 void TestParams(omaha_client::OmahaQueryParams::ProdId prod_id) {
22 std::string params = omaha_client::OmahaQueryParams::Get(prod_id);
23
24 EXPECT_TRUE(Contains(
25 params,
26 StringPrintf("os=%s", omaha_client::OmahaQueryParams::GetOS())));
27 EXPECT_TRUE(
28 Contains(params,
29 StringPrintf("arch=%s",
30 omaha_client::OmahaQueryParams::GetArch())));
31 EXPECT_TRUE(Contains(
32 params,
33 StringPrintf(
34 "prod=%s",
35 omaha_client::OmahaQueryParams::GetProdIdString(prod_id))));
36 EXPECT_TRUE(Contains(
37 params,
38 StringPrintf("prodchannel=%s",
39 ChromeOmahaQueryParamsDelegate::GetChannelString())));
40 EXPECT_TRUE(Contains(
41 params,
42 StringPrintf("prodversion=%s", chrome::VersionInfo().Version().c_str())));
43 EXPECT_TRUE(Contains(
44 params,
45 StringPrintf("lang=%s", ChromeOmahaQueryParamsDelegate::GetLang())));
46 }
47
48 TEST(ChromeOmahaQueryParamsDelegateTest, GetParams) {
49 TestParams(omaha_client::OmahaQueryParams::CRX);
50 TestParams(omaha_client::OmahaQueryParams::CHROME);
51 }
OLDNEW
« no previous file with comments | « chrome/browser/omaha_client/chrome_omaha_query_params_delegate.cc ('k') | chrome/browser/ui/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698