OLD | NEW |
| (Empty) |
1 // Copyright 2009 Google Inc. | |
2 // | |
3 // Licensed under the Apache License, Version 2.0 (the "License"); | |
4 // you may not use this file except in compliance with the License. | |
5 // You may obtain a copy of the License at | |
6 // | |
7 // http://www.apache.org/licenses/LICENSE-2.0 | |
8 // | |
9 // Unless required by applicable law or agreed to in writing, software | |
10 // distributed under the License is distributed on an "AS IS" BASIS, | |
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
12 // See the License for the specific language governing permissions and | |
13 // limitations under the License. | |
14 // ======================================================================== | |
15 | |
16 #include <atlpath.h> | |
17 #include "omaha/base/app_util.h" | |
18 #include "omaha/base/constants.h" | |
19 #include "omaha/base/file.h" | |
20 #include "omaha/base/omaha_version.h" | |
21 #include "omaha/base/utils.h" | |
22 #include "omaha/testing/unit_test.h" | |
23 | |
24 namespace omaha { | |
25 | |
26 TEST(GoogleUpdateTest, ShellVersion) { | |
27 CPath actual_shell_path(app_util::GetCurrentModuleDirectory()); | |
28 ASSERT_TRUE(actual_shell_path.Append(kOmahaShellFileName)); | |
29 | |
30 ASSERT_TRUE(File::Exists(actual_shell_path)); | |
31 const ULONGLONG actual_shell_version = | |
32 app_util::GetVersionFromFile(actual_shell_path); | |
33 | |
34 EXPECT_TRUE(actual_shell_version); | |
35 #if TEST_CERTIFICATE | |
36 EXPECT_EQ(OMAHA_BUILD_VERSION, actual_shell_version); | |
37 EXPECT_STREQ(OMAHA_BUILD_VERSION_STRING, | |
38 StringFromVersion(actual_shell_version)); | |
39 #else | |
40 // This version must be updated whenever the saved shell is updated. | |
41 EXPECT_STREQ(_T("1.2.183.21"), StringFromVersion(actual_shell_version)); | |
42 #endif | |
43 } | |
44 | |
45 } // namespace omaha | |
OLD | NEW |