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

Unified Diff: content/shell/renderer/test_runner/helper/layout_test_helper_win.cc

Issue 1167703002: Move test runner to a component (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updates Created 5 years, 7 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
Index: content/shell/renderer/test_runner/helper/layout_test_helper_win.cc
diff --git a/content/shell/renderer/test_runner/helper/layout_test_helper_win.cc b/content/shell/renderer/test_runner/helper/layout_test_helper_win.cc
deleted file mode 100644
index 9ec99890d4b56002bf5fca89d69668381d4aa842..0000000000000000000000000000000000000000
--- a/content/shell/renderer/test_runner/helper/layout_test_helper_win.cc
+++ /dev/null
@@ -1,54 +0,0 @@
-// Copyright 2014 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.
-
-#include <signal.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <windows.h>
-
-static BOOL font_smoothing_enabled = FALSE;
-
-static void SaveInitialSettings() {
- ::SystemParametersInfo(SPI_GETFONTSMOOTHING, 0, &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() {
- ::SystemParametersInfo(SPI_SETFONTSMOOTHING, FALSE, 0, 0);
-}
-
-static void RestoreInitialSettings() {
- ::SystemParametersInfo(
- SPI_SETFONTSMOOTHING, static_cast<UINT>(font_smoothing_enabled), 0, 0);
-}
-
-static void SimpleSignalHandler(int signalNumber) {
- // Try to restore the settings and then go down cleanly.
- RestoreInitialSettings();
- exit(128 + signalNumber);
-}
-
-int main(int, char**) {
- // 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 EXIT_SUCCESS;
-}

Powered by Google App Engine
This is Rietveld 408576698