| Index: third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/linux_unittest.py
|
| diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/linux_unittest.py b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/linux_unittest.py
|
| index 9b96ae6bcf4cd0556fe96149d4518a1736d3cbcd..0855e084b5881c592eb0a741217ac4b809435e8e 100644
|
| --- a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/linux_unittest.py
|
| +++ b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/linux_unittest.py
|
| @@ -136,6 +136,30 @@ class LinuxPortTest(port_testcase.PortTestCase):
|
| env = port.setup_environ_for_server()
|
| self.assertEqual(env['DISPLAY'], ':99')
|
|
|
| + def test_setup_test_run_starts_xvfb_clears_tmpdir(self):
|
| + def run_command_fake(args):
|
| + if args[0] == 'xdpyinfo':
|
| + if '-display' in args:
|
| + return 1
|
| + return 0
|
| +
|
| + port = self.make_port()
|
| + port.host.environ['TMPDIR'] = '/foo/bar'
|
| + port.host.executive = MockExecutive(
|
| + run_command_fn=run_command_fake)
|
| + port.setup_test_run()
|
| +
|
| + self.assertEqual(
|
| + port.host.executive.calls,
|
| + [
|
| + ['xdpyinfo', '-display', ':99'],
|
| + ['Xvfb', ':99', '-screen', '0', '1280x800x24', '-ac', '-dpi', '96'],
|
| + ['xdpyinfo'],
|
| + ])
|
| + self.assertEqual(port.host.executive.full_calls[1].env.get('TMPDIR'), '/tmp')
|
| + env = port.setup_environ_for_server()
|
| + self.assertEqual(env['DISPLAY'], ':99')
|
| +
|
| def test_setup_test_runs_finds_free_display(self):
|
| def run_command_fake(args):
|
| if args[0] == 'xdpyinfo':
|
|
|