Run linux tests with deterministic font configuration

This CL sets up a common font environment for all tests to run under.  In
particular:
* All gtests and layout tests start with the same font config.
* The font config is isolated from any system font settings.

These changes were necessary:
* Moved fontconfig_util_linux.* into //base so that SetUpFontconfig() could be
  called during common test setup.
* Made DejaVu Sans the fallback sans font instead of Arial (ie the system font
  matched when the font family is set to 'sans').  The gtests used to use DejaVu
  Sans for this font (usually), but the layout tests used Arial.  I sided with
  the gtests in this case because it's easier to rebaseline the layout tests
  than to fix a slew of gtests.
* Added DejaVu Sans Bold to test_fonts.  Some gtests expected a bold default
  font.
* Moved third_party/content_shell_test_fonts to third_party/test_fonts.
* Fixed gtests broken by the new config.
* Rebaselined layout tests.
* Use bundled fontconfig for ChromeOS, matching the behavior on Linux.  (Only
  for desktop ChromeOS builds.  Real ChromeOS builds will still use the system
  fontconfig.)

Additionally, building the fontconfig cache is a nontrivial task.  It can take
~600ms when done from scratch.  To fix this, fontconfig cache files are saved to
the out directory.  Fontconfig initialization takes < 1ms with this
optimization, and the initialization only needs to happen once per test suite,
not at the beginning of each test.  Finally, to prevent the 600ms from being
added to the first test suite to run, the cache files are generated as part of
the build.

The tests still pull in system fonts from msttcorefonts, but those should soon
be replaced by alternatives in third_party/test_fonts.  Once this is done, this
should fix font related test failures caused by differences between Linux
systems or system font configurations.

CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_chromium_dbg_32_ng;master.tryserver.chromium.linux:linux_arm
BUG=787020,818136

Change-Id: If6bcbd35bddf86dec3f02d105d8be551b898e9b2
Reviewed-on: https://chromium-review.googlesource.com/938578
Reviewed-by: Lei Zhang <[email protected]>
Reviewed-by: Takashi Toyoshima <[email protected]>
Reviewed-by: Nico Weber <[email protected]>
Reviewed-by: Dirk Pranke <[email protected]>
Reviewed-by: Sami Kyöstilä <[email protected]>
Reviewed-by: Antoine Labour <[email protected]>
Reviewed-by: Dominik Röttsches <[email protected]>
Commit-Queue: Thomas Anderson <[email protected]>
Cr-Commit-Position: refs/heads/master@{#543414}
diff --git a/DEPS b/DEPS
index bdeef9c..4e7c8ab 100644
--- a/DEPS
+++ b/DEPS
@@ -1004,7 +1004,7 @@
     ]
   },
  {
-    'name': 'content_shell_fonts',
+    'name': 'test_fonts',
     'pattern': '.',
     'condition': 'checkout_linux or (checkout_android or checkout_fuchsia)',
     'action': [ 'download_from_google_storage',
@@ -1012,7 +1012,7 @@
                 '--extract',
                 '--no_auth',
                 '--bucket', 'chromium-fonts',
-                '-s', 'src/third_party/content_shell_fonts/content_shell_test_fonts.tar.gz.sha1',
+                '-s', 'src/third_party/test_fonts/test_fonts.tar.gz.sha1',
     ],
   },
   # Pull order files for the win/clang build.