Commit 8c47c490 authored by Yutaka Hirano's avatar Yutaka Hirano Committed by Commit Bot

Provide a way to disable WebTestBrowserCheckLayoutSystemDeps

On Windows the function requires system fonts to be "Segoe UI", which is
overly restrictive when we are not interested in layout.

Bug: 1074776
Change-Id: I8ac77928c0049eec67b7f0944872f3b5cc2b96b5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2166232Reviewed-by: default avatarMatt Falkenhagen <falken@chromium.org>
Commit-Queue: Yutaka Hirano <yhirano@chromium.org>
Cr-Commit-Position: refs/heads/master@{#762721}
parent 9781ff27
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#include "base/path_service.h" #include "base/path_service.h"
#include "base/stl_util.h" #include "base/stl_util.h"
#include "base/strings/utf_string_conversions.h" #include "base/strings/utf_string_conversions.h"
#include "content/shell/common/shell_switches.h"
#include "ui/gfx/win/direct_write.h" #include "ui/gfx/win/direct_write.h"
namespace content { namespace content {
...@@ -41,6 +42,12 @@ void SetupFonts() { ...@@ -41,6 +42,12 @@ void SetupFonts() {
} // namespace } // namespace
bool WebTestBrowserCheckLayoutSystemDeps() { bool WebTestBrowserCheckLayoutSystemDeps() {
const base::CommandLine& command_line =
*base::CommandLine::ForCurrentProcess();
if (command_line.HasSwitch(switches::kDisableSystemFontCheck)) {
return true;
}
std::list<std::string> errors; std::list<std::string> errors;
// This metric will be 17 when font size is "Normal". // This metric will be 17 when font size is "Normal".
......
...@@ -14,6 +14,9 @@ const char kContentShellDataPath[] = "data-path"; ...@@ -14,6 +14,9 @@ const char kContentShellDataPath[] = "data-path";
// The directory breakpad should store minidumps in. // The directory breakpad should store minidumps in.
const char kCrashDumpsDir[] = "crash-dumps-dir"; const char kCrashDumpsDir[] = "crash-dumps-dir";
// Disables the check for the system font when specified.
const char kDisableSystemFontCheck[] = "disable-system-font-check";
// Exposes the window.internals object to JavaScript for interactive development // Exposes the window.internals object to JavaScript for interactive development
// and debugging of web tests that rely on it. // and debugging of web tests that rely on it.
const char kExposeInternalsForTesting[] = "expose-internals-for-testing"; const char kExposeInternalsForTesting[] = "expose-internals-for-testing";
......
...@@ -11,6 +11,7 @@ namespace switches { ...@@ -11,6 +11,7 @@ namespace switches {
extern const char kContentShellDataPath[]; extern const char kContentShellDataPath[];
extern const char kCrashDumpsDir[]; extern const char kCrashDumpsDir[];
extern const char kDisableSystemFontCheck[];
extern const char kExposeInternalsForTesting[]; extern const char kExposeInternalsForTesting[];
extern const char kContentShellHostWindowSize[]; extern const char kContentShellHostWindowSize[];
extern const char kContentShellHideToolbar[]; extern const char kContentShellHideToolbar[];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment