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

Side by Side Diff: chrome/browser/ssl/ssl_blocking_page_unittest.cc

Issue 336273002: Suggest upgrading to SP3 or later for invalid certificate errors. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments Created 6 years, 5 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
OLDNEW
(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) {
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698