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

Side by Side Diff: chrome/installer/util/uninstall_metrics_unittest.cc

Issue 16421004: Use a direct include of strings headers in chrome/installer/, part 2. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « chrome/installer/util/uninstall_metrics.h ('k') | chrome/installer/util/user_experiment.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/installer/util/uninstall_metrics.h" 5 #include "chrome/installer/util/uninstall_metrics.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/json/json_string_value_serializer.h" 9 #include "base/json/json_string_value_serializer.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "base/string16.h" 11 #include "base/strings/string16.h"
12 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
13 13
14 namespace installer { 14 namespace installer {
15 15
16 TEST(UninstallMetricsTest, TestExtractUninstallMetrics) { 16 TEST(UninstallMetricsTest, TestExtractUninstallMetrics) {
17 // A make-believe JSON preferences file. 17 // A make-believe JSON preferences file.
18 std::string pref_string( 18 std::string pref_string(
19 "{ \n" 19 "{ \n"
20 " \"foo\": \"bar\",\n" 20 " \"foo\": \"bar\",\n"
21 " \"uninstall_metrics\": { \n" 21 " \"uninstall_metrics\": { \n"
(...skipping 28 matching lines...) Expand all
50 ASSERT_TRUE(root.get()); 50 ASSERT_TRUE(root.get());
51 string16 uninstall_metrics_string; 51 string16 uninstall_metrics_string;
52 52
53 EXPECT_TRUE( 53 EXPECT_TRUE(
54 ExtractUninstallMetrics(*static_cast<DictionaryValue*>(root.get()), 54 ExtractUninstallMetrics(*static_cast<DictionaryValue*>(root.get()),
55 &uninstall_metrics_string)); 55 &uninstall_metrics_string));
56 EXPECT_EQ(expected_url_string, uninstall_metrics_string); 56 EXPECT_EQ(expected_url_string, uninstall_metrics_string);
57 } 57 }
58 58
59 } // namespace installer 59 } // namespace installer
OLDNEW
« no previous file with comments | « chrome/installer/util/uninstall_metrics.h ('k') | chrome/installer/util/user_experiment.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698