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

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

Issue 5756007: Revert 69165 - Merge the installer, installer_util and setup_util namespaces ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years 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
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 // Unit tests for GoogleChromeDistribution class. 5 // Unit tests for GoogleChromeDistribution class.
6 6
7 #include <windows.h> 7 #include <windows.h>
8 8
9 #include "base/scoped_ptr.h" 9 #include "base/scoped_ptr.h"
10 #include "chrome/common/json_value_serializer.h" 10 #include "chrome/common/json_value_serializer.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 L"&launch_count=11&page_load_count=68" 45 L"&launch_count=11&page_load_count=68"
46 L"&uptime_sec=809"); 46 L"&uptime_sec=809");
47 47
48 JSONStringValueSerializer json_deserializer(pref_string); 48 JSONStringValueSerializer json_deserializer(pref_string);
49 std::string error_message; 49 std::string error_message;
50 50
51 scoped_ptr<Value> root(json_deserializer.Deserialize(NULL, &error_message)); 51 scoped_ptr<Value> root(json_deserializer.Deserialize(NULL, &error_message));
52 ASSERT_TRUE(root.get()); 52 ASSERT_TRUE(root.get());
53 std::wstring uninstall_metrics_string; 53 std::wstring uninstall_metrics_string;
54 54
55 const installer::MasterPreferences& prefs = 55 const installer_util::MasterPreferences& prefs =
56 installer::MasterPreferences::ForCurrentProcess(); 56 installer_util::MasterPreferences::ForCurrentProcess();
57 57
58 GoogleChromeDistribution* dist = static_cast<GoogleChromeDistribution*>( 58 GoogleChromeDistribution* dist = static_cast<GoogleChromeDistribution*>(
59 BrowserDistribution::GetSpecificDistribution( 59 BrowserDistribution::GetSpecificDistribution(
60 BrowserDistribution::CHROME_BROWSER, prefs)); 60 BrowserDistribution::CHROME_BROWSER, prefs));
61 61
62 EXPECT_TRUE( 62 EXPECT_TRUE(
63 dist->ExtractUninstallMetrics(*static_cast<DictionaryValue*>(root.get()), 63 dist->ExtractUninstallMetrics(*static_cast<DictionaryValue*>(root.get()),
64 &uninstall_metrics_string)); 64 &uninstall_metrics_string));
65 EXPECT_EQ(expected_url_string, uninstall_metrics_string); 65 EXPECT_EQ(expected_url_string, uninstall_metrics_string);
66 } 66 }
67 #endif // defined(GOOGLE_CHROME_BUILD) 67 #endif // defined(GOOGLE_CHROME_BUILD)
OLDNEW
« no previous file with comments | « chrome/installer/util/google_chrome_distribution_dummy.cc ('k') | chrome/installer/util/google_chrome_sxs_distribution.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698