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

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: 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
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 "testing/gtest/include/gtest/gtest.h"
8
9 namespace app_installer {
10
11 TEST(AppInstallerUtilTest, ParseTag) {
12 std::map<std::string, std::string> parsed_pairs;
grt (UTC plus 2) 2014/11/07 03:13:36 #include <map> #include <string>
jackhou1 2014/11/07 05:37:53 Done.
13
14 parsed_pairs.clear();
15 EXPECT_TRUE(ParseTag("key1=value1&key2=value2", &parsed_pairs));
16 EXPECT_EQ(2, parsed_pairs.size());
17 EXPECT_EQ("value1", parsed_pairs["key1"]);
18 EXPECT_EQ("value2", parsed_pairs["key2"]);
19
20 parsed_pairs.clear();
21 EXPECT_FALSE(ParseTag("a&b", &parsed_pairs));
22
23 parsed_pairs.clear();
24 EXPECT_FALSE(ParseTag("#=a", &parsed_pairs));
25
26 parsed_pairs.clear();
27 EXPECT_FALSE(ParseTag("a=\01", &parsed_pairs));
28 }
29
30 } // namespace app_installer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698