Chromium Code Reviews| 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 |