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

Unified Diff: webkit/tools/test_shell/win/layout_test_helper.cc

Issue 10694063: Remove layout_test_helper from webkit/tools/test_shell. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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/test_shell/test_shell.gypi ('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/win/layout_test_helper.cc
diff --git a/webkit/tools/test_shell/win/layout_test_helper.cc b/webkit/tools/test_shell/win/layout_test_helper.cc
deleted file mode 100644
index b9bf0eb477b233af74ece9a7968eb0974773b219..0000000000000000000000000000000000000000
--- a/webkit/tools/test_shell/win/layout_test_helper.cc
+++ /dev/null
@@ -1,62 +0,0 @@
-// Copyright (c) 2009 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.
-//
-// This is a simple helper app that disables Cleartype and does whatever
-// else it can to get the system into the configuration the layout tests
-// expect.
-
-#include <signal.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <windows.h>
-
-BOOL g_font_smoothing_enabled = FALSE;
-
-static void SaveInitialSettings(void) {
- BOOL ret;
- ret = SystemParametersInfo(SPI_GETFONTSMOOTHING, 0,
- (PVOID)&g_font_smoothing_enabled, 0);
-}
-
-// Technically, all we need to do is disable ClearType. However,
-// for some reason, the call to SPI_SETFONTSMOOTHINGTYPE doesn't
-// seem to work, so we just disable font smoothing all together
-// (which works reliably)
-static void InstallLayoutTestSettings(void) {
- BOOL ret;
- ret = SystemParametersInfo(SPI_SETFONTSMOOTHING, (UINT)FALSE, (PVOID)0, 0);
-}
-
-static void RestoreInitialSettings(void) {
- BOOL ret;
- ret = SystemParametersInfo(SPI_SETFONTSMOOTHING,
- (UINT)g_font_smoothing_enabled, (PVOID)0, 0);
-}
-
-static void SimpleSignalHandler(int sig) {
- // Try to restore the settings and then go down cleanly
- RestoreInitialSettings();
- exit(128 + sig);
-}
-
-int main(int argc, char *argv[]) {
- // Hooks the ways we might get told to clean up...
- signal(SIGINT, SimpleSignalHandler);
- signal(SIGTERM, SimpleSignalHandler);
-
- SaveInitialSettings();
-
- InstallLayoutTestSettings();
-
- // Let the script know we're ready
- printf("ready\n");
- fflush(stdout);
-
- // Wait for any key (or signal)
- getchar();
-
- RestoreInitialSettings();
-
- return 0;
-}
« no previous file with comments | « webkit/tools/test_shell/test_shell.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698