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

Side by Side Diff: chrome/app_installer/win/app_installer_util_unittest.cc

Issue 689903003: [app_installer] Refactor and add app_installer_unittests target. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync and rebase Created 6 years, 1 month 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
« no previous file with comments | « chrome/app_installer/win/app_installer_util.cc ('k') | testing/buildbot/chromium.win.json » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "chrome/app_installer/win/app_installer_util.h"
6
7 #include <map>
8 #include <string>
9
10 #include "testing/gtest/include/gtest/gtest.h"
11
12 namespace app_installer {
13
14 TEST(AppInstallerUtilTest, ParseTag) {
15 std::map<std::string, std::string> parsed_pairs;
16
17 parsed_pairs.clear();
18 EXPECT_TRUE(ParseTag("key1=value1&key2=value2", &parsed_pairs));
19 EXPECT_EQ(2, parsed_pairs.size());
20 EXPECT_EQ("value1", parsed_pairs["key1"]);
21 EXPECT_EQ("value2", parsed_pairs["key2"]);
22
23 parsed_pairs.clear();
24 EXPECT_FALSE(ParseTag("a&b", &parsed_pairs));
25
26 parsed_pairs.clear();
27 EXPECT_FALSE(ParseTag("#=a", &parsed_pairs));
28
29 parsed_pairs.clear();
30 EXPECT_FALSE(ParseTag("a=\01", &parsed_pairs));
31 }
32
33 } // namespace app_installer
OLDNEW
« no previous file with comments | « chrome/app_installer/win/app_installer_util.cc ('k') | testing/buildbot/chromium.win.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698