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

Unified Diff: webkit/tools/test_shell/test_shell_platform_delegate_win.cc

Issue 342033: Make run_webkit_tests work on Windows 7. ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 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 | « webkit/tools/layout_tests/layout_package/test_expectations.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/tools/test_shell/test_shell_platform_delegate_win.cc
===================================================================
--- webkit/tools/test_shell/test_shell_platform_delegate_win.cc (revision 30382)
+++ webkit/tools/test_shell/test_shell_platform_delegate_win.cc (working copy)
@@ -49,28 +49,34 @@
osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
::GetVersionEx((OSVERSIONINFO *)&osvi);
- // default to XP metrics, override if on Vista
+ // Default to XP metrics, override if on Vista or win 7.
int requiredVScrollSize = 17;
int requiredFontSize = -11; // 8 pt
const wchar_t* requiredFont = L"Tahoma";
- // Consider Windows 7 as Vista.
bool isVista = false;
+ bool isWin7 = false;
if (osvi.dwMajorVersion == 6
- && (osvi.dwMinorVersion == 0 || osvi.dwMinorVersion == 1)
+ && osvi.dwMinorVersion == 1
&& osvi.wProductType == VER_NT_WORKSTATION) {
requiredFont = L"Segoe UI";
+ requiredFontSize = -12;
+ isWin7 = true;
+ } else if (osvi.dwMajorVersion == 6
+ && osvi.dwMinorVersion == 0
+ && osvi.wProductType == VER_NT_WORKSTATION) {
+ requiredFont = L"Segoe UI";
requiredFontSize = -12; // 9 pt
isVista = true;
} else if (osvi.dwMajorVersion == 5
&& osvi.dwMinorVersion == 1
&& osvi.wProductType == VER_NT_WORKSTATION) {
- // XP;
+ ; // XP
ojan 2009/10/29 20:32:31 Nit: This seems weird to me. That compiles? How a
Dirk Pranke 2009/10/29 21:03:20 Sure, it compiles - it's just an empty statement.
} else {
errors.push_back("Unsupported Operating System version "
- "(must use XP or Vista).");
+ "(must use XP, Vista, or Windows 7).");
}
- // on both XP and Vista, this metric will be 17 when font size is "Normal".
+ // This metric will be 17 when font size is "Normal".
// The size of drop-down menus depends on it.
int vScrollSize = ::GetSystemMetrics(SM_CXVSCROLL);
if (vScrollSize != requiredVScrollSize) {
@@ -97,7 +103,7 @@
for (size_t i = 0; i < arraysize(system_fonts); ++i) {
if (system_fonts[i]->lfHeight != requiredFontSize ||
wcscmp(requiredFont, system_fonts[i]->lfFaceName)) {
- if (isVista)
+ if (isVista || isWin7)
errors.push_back("Must use either the Aero or Basic theme.");
else
errors.push_back("Must use the default XP theme (Luna).");
« no previous file with comments | « webkit/tools/layout_tests/layout_package/test_expectations.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698