graphics_Sanity: Remove X11 remnants

BUG=chromium:655820
TEST=test_that

Change-Id: Id65953c675efb0ab22a09b25f9b457dfedd6e943
Reviewed-on: https://chromium-review.googlesource.com/493895
Commit-Ready: Ilja H. Friedel <ihf@chromium.org>
Tested-by: Ilja H. Friedel <ihf@chromium.org>
Reviewed-by: Ilja H. Friedel <ihf@chromium.org>
diff --git a/client/site_tests/graphics_Sanity/graphics_Sanity.py b/client/site_tests/graphics_Sanity/graphics_Sanity.py
index b4f66c1..0ec8e8a 100644
--- a/client/site_tests/graphics_Sanity/graphics_Sanity.py
+++ b/client/site_tests/graphics_Sanity/graphics_Sanity.py
@@ -50,7 +50,7 @@
         Draws a texture with a soft ellipse twice and captures each image.
         Compares the output fuzzily against reference images.
         """
-        if utils.is_freon() and graphics_utils.get_display_resolution() is None:
+        if graphics_utils.get_display_resolution() is None:
             logging.warning('Skipping test because there is no screen')
             return
 
@@ -78,25 +78,14 @@
         options += ' --screenshot2_sec 1'
         options += ' --cooldown_sec 1'
         # perceptualdiff can handle only 8 bit images.
-        if not utils.is_freon():
-          screenshot_cmd = ' "DISPLAY=:1 import -window root %s"'
-        else:
-          screenshot_cmd = ' "/usr/local/autotest/bin/screenshot.py %s"'
+        screenshot_cmd = ' "/usr/local/autotest/bin/screenshot.py %s"'
         options += ' --screenshot1_cmd' + screenshot_cmd % screenshot1_generated
         options += ' --screenshot2_cmd' + screenshot_cmd % screenshot2_generated
 
         cmd = exefile + ' ' + options
-        if not utils.is_freon():
-          cmd = 'X :1 vt1 & sleep 1; chvt 1 && DISPLAY=:1 ' + cmd
-        try:
-          utils.run(cmd,
-                    stdout_tee=utils.TEE_TO_LOGS,
-                    stderr_tee=utils.TEE_TO_LOGS)
-        finally:
-          if not utils.is_freon():
-            # Just sending SIGTERM to X is not enough; we must wait for it to
-            # really die before we start a new X server (ie start ui).
-            utils.ensure_processes_are_dead_by_name('^X$')
+        utils.run(cmd,
+                  stdout_tee=utils.TEE_TO_LOGS,
+                  stderr_tee=utils.TEE_TO_LOGS)
 
         convert_cmd = ("convert -channel RGB -colorspace RGB -depth 8"
                        " -resize '100x100!' %s %s")