OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file | |
4 | |
5 #include "chrome/browser/ssl/ssl_blocking_page.h" | |
6 #include "chrome/test/base/browser_with_test_window_test.h" | |
7 #include "content/public/browser/web_contents.h" | |
8 #include "content/public/test/web_contents_tester.h" | |
9 #include "testing/gtest/include/gtest/gtest.h" | |
10 | |
11 #if defined(OS_WIN) | |
12 #include "base/win/windows_version.h" | |
13 #endif | |
14 | |
15 TEST(SSLBlockingPageTest, SSLBlockingPageWindowsVersionTest) { | |
felt
2014/06/30 18:36:15
This test won't get coverage because we don't have
radhikabhar
2014/07/01 23:56:49
Should I change it to get the OS info from OSInfo.
| |
16 bool os_version_win = false; | |
17 #if defined(OS_WIN) | |
18 os_version_win = true; | |
19 OSVERSIONINFOEX version_info = { sizeof version_info }; | |
20 GetVersionEx(reinterpret_cast<OSVERSIONINFO*>(&version_info)); | |
21 if ((version_info.dwMajorVersion == 5) && (version_info.dwMinorVersion == 1) | |
22 && (version_info.wServicePackMajor < 3)) | |
23 EXPECT_TRUE(SSLBlockingPage::WindowsVersionSP3Lower()); | |
24 else | |
25 EXPECT_FALSE(SSLBlockingPage::WindowsVersionSP3Lower()); | |
26 #endif | |
27 if (!os_version_win) | |
28 EXPECT_FALSE(SSLBlockingPage::WindowsVersionSP3Lower()); | |
29 } | |
OLD | NEW |