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

Unified Diff: chrome/common/chrome_constants_win_unittest.cc

Issue 2656443002: Use chrome::kChromeVersion in installer::GetModulePath(). (Closed)
Patch Set: Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/installer/util/module_util_win.cc » ('j') | chrome/installer/util/module_util_win.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/chrome_constants_win_unittest.cc
diff --git a/chrome/common/chrome_constants_win_unittest.cc b/chrome/common/chrome_constants_win_unittest.cc
new file mode 100644
index 0000000000000000000000000000000000000000..d9f2c35a520ca29a7dbdd2accc4151ec81d0aaba
--- /dev/null
+++ b/chrome/common/chrome_constants_win_unittest.cc
@@ -0,0 +1,26 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/common/chrome_constants.h"
+
+#include <memory>
+
+#include "base/file_version_info.h"
+#include "base/strings/utf_string_conversions.h"
+#include "base/win/current_module.h"
+#include "testing/gtest/include/gtest/gtest.h"
+
+namespace chrome {
+
+// Verify that |kChromeVersion| is equal to the version in the VS_VERSION_INFO
+// resource of the current module.
+TEST(ChromeConstants, ChromeVersion) {
+ std::unique_ptr<FileVersionInfo> file_version_info(
+ FileVersionInfo::CreateFileVersionInfoForModule(CURRENT_MODULE()));
grt (UTC plus 2) 2017/01/24 09:37:16 we want a test that will fail specifically if the
fdoray 2017/01/31 20:47:17 Done.
+ ASSERT_TRUE(file_version_info);
+ EXPECT_EQ(base::UTF16ToASCII(file_version_info->file_version()),
+ kChromeVersion);
+}
+
+} // namespace chrome
« no previous file with comments | « no previous file | chrome/installer/util/module_util_win.cc » ('j') | chrome/installer/util/module_util_win.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698