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/product_unittest.cc

Issue 2258243002: Consistently use namespaced base::Version in chrome/installer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
« no previous file with comments | « chrome/installer/util/installer_state_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.h" 5 #include "chrome/installer/util/product.h"
6 6
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 machine_state.Initialize(); 60 machine_state.Initialize();
61 EXPECT_TRUE(machine_state.GetProductState( 61 EXPECT_TRUE(machine_state.GetProductState(
62 system_level, distribution->GetType()) == NULL); 62 system_level, distribution->GetType()) == NULL);
63 63
64 // Let's pretend chrome is installed. 64 // Let's pretend chrome is installed.
65 RegKey version_key(root, distribution->GetVersionKey().c_str(), 65 RegKey version_key(root, distribution->GetVersionKey().c_str(),
66 KEY_ALL_ACCESS); 66 KEY_ALL_ACCESS);
67 ASSERT_TRUE(version_key.Valid()); 67 ASSERT_TRUE(version_key.Valid());
68 68
69 const char kCurrentVersion[] = "1.2.3.4"; 69 const char kCurrentVersion[] = "1.2.3.4";
70 Version current_version(kCurrentVersion); 70 base::Version current_version(kCurrentVersion);
71 version_key.WriteValue(google_update::kRegVersionField, 71 version_key.WriteValue(google_update::kRegVersionField,
72 base::UTF8ToWide( 72 base::UTF8ToWide(
73 current_version.GetString()).c_str()); 73 current_version.GetString()).c_str());
74 74
75 // We started out with a non-msi product. 75 // We started out with a non-msi product.
76 machine_state.Initialize(); 76 machine_state.Initialize();
77 const installer::ProductState* chrome_state = 77 const installer::ProductState* chrome_state =
78 machine_state.GetProductState(system_level, distribution->GetType()); 78 machine_state.GetProductState(system_level, distribution->GetType());
79 EXPECT_TRUE(chrome_state != NULL); 79 EXPECT_TRUE(chrome_state != NULL);
80 if (chrome_state != NULL) { 80 if (chrome_state != NULL) {
(...skipping 16 matching lines...) Expand all
97 if (chrome_state != NULL) 97 if (chrome_state != NULL)
98 EXPECT_TRUE(chrome_state->is_msi()); 98 EXPECT_TRUE(chrome_state->is_msi());
99 } 99 }
100 } 100 }
101 101
102 TEST(ProductTest, LaunchChrome) { 102 TEST(ProductTest, LaunchChrome) {
103 // TODO(tommi): Test Product::LaunchChrome and 103 // TODO(tommi): Test Product::LaunchChrome and
104 // Product::LaunchChromeAndWait. 104 // Product::LaunchChromeAndWait.
105 NOTIMPLEMENTED(); 105 NOTIMPLEMENTED();
106 } 106 }
OLDNEW
« no previous file with comments | « chrome/installer/util/installer_state_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698