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

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

Issue 12314090: Add utf_string_conversions to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/product_unittest.h" 5 #include "chrome/installer/util/product_unittest.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/test/test_reg_util_win.h" 8 #include "base/test/test_reg_util_win.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/common/chrome_constants.h" 10 #include "chrome/common/chrome_constants.h"
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 override_manager.OverrideRegistry(root, L"root_pit"); 103 override_manager.OverrideRegistry(root, L"root_pit");
104 104
105 // Let's pretend chrome is installed. 105 // Let's pretend chrome is installed.
106 RegKey version_key(root, distribution->GetVersionKey().c_str(), 106 RegKey version_key(root, distribution->GetVersionKey().c_str(),
107 KEY_ALL_ACCESS); 107 KEY_ALL_ACCESS);
108 ASSERT_TRUE(version_key.Valid()); 108 ASSERT_TRUE(version_key.Valid());
109 109
110 const char kCurrentVersion[] = "1.2.3.4"; 110 const char kCurrentVersion[] = "1.2.3.4";
111 Version current_version(kCurrentVersion); 111 Version current_version(kCurrentVersion);
112 version_key.WriteValue(google_update::kRegVersionField, 112 version_key.WriteValue(google_update::kRegVersionField,
113 UTF8ToWide(current_version.GetString()).c_str()); 113 base::UTF8ToWide(current_version.GetString()).c_str());
114 114
115 // We started out with a non-msi product. 115 // We started out with a non-msi product.
116 machine_state.Initialize(); 116 machine_state.Initialize();
117 const installer::ProductState* chrome_state = 117 const installer::ProductState* chrome_state =
118 machine_state.GetProductState(system_level, distribution->GetType()); 118 machine_state.GetProductState(system_level, distribution->GetType());
119 EXPECT_TRUE(chrome_state != NULL); 119 EXPECT_TRUE(chrome_state != NULL);
120 if (chrome_state != NULL) { 120 if (chrome_state != NULL) {
121 EXPECT_TRUE(chrome_state->version().Equals(current_version)); 121 EXPECT_TRUE(chrome_state->version().Equals(current_version));
122 EXPECT_FALSE(chrome_state->is_msi()); 122 EXPECT_FALSE(chrome_state->is_msi());
123 } 123 }
(...skipping 13 matching lines...) Expand all
137 if (chrome_state != NULL) 137 if (chrome_state != NULL)
138 EXPECT_TRUE(chrome_state->is_msi()); 138 EXPECT_TRUE(chrome_state->is_msi());
139 } 139 }
140 } 140 }
141 141
142 TEST_F(ProductTest, LaunchChrome) { 142 TEST_F(ProductTest, LaunchChrome) {
143 // TODO(tommi): Test Product::LaunchChrome and 143 // TODO(tommi): Test Product::LaunchChrome and
144 // Product::LaunchChromeAndWait. 144 // Product::LaunchChromeAndWait.
145 LOG(ERROR) << "Test not implemented."; 145 LOG(ERROR) << "Test not implemented.";
146 } 146 }
OLDNEW
« no previous file with comments | « chrome/installer/util/move_tree_work_item_unittest.cc ('k') | chrome/installer/util/self_cleaning_temp_dir_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698