firmware_TouchpadMTB: run unittests on a host

The environments of a host and a chromebook machine are sort of
different. For example, there is no Xlib module in the host while
the module does exist in a chromebook. This CL makes possible
running unittests on a host by moving the Xlib module into the class
that pactually imports it, and by not instantiating validator objects
which requires probing a touch device.

BUG=chromium-os:35024
TEST=Run the following unittests on a host rather than on a chromebook:
$ cd .../autotest/files/client/site_tests/firmware_TouchpadMTB
$ python tests/mtb_unittest.py

The unittests should all pass.

Change-Id: Ide552c9d679df55239f00c1ce6e8cba2d84e1ef1
Reviewed-on: https://gerrit.chromium.org/gerrit/34604
Commit-Ready: Joseph Shyh-In Hwang <josephsih@chromium.org>
Reviewed-by: Joseph Shyh-In Hwang <josephsih@chromium.org>
Tested-by: Joseph Shyh-In Hwang <josephsih@chromium.org>
4 files changed