| 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 fe363f73c44d767964611998b915a8c11137a37d..e62e030ecf3d1501de23567d7087be83b9a53ba0 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
|
| @@ -114,3 +114,30 @@ class LinuxPortTest(port_testcase.PortTestCase):
|
| port.clean_up_test_run()
|
| self.assertEqual(port.host.environ['HOME'], '/home/user')
|
| self.assertFalse(port.host.filesystem.exists(temp_home_dir))
|
| +
|
| + def test_xvfb_started_no_display(self):
|
| + port = self.make_port()
|
| + port.host.environ['DISPLAY'] = ''
|
| + port.setup_test_run()
|
| + self.assertEqual(
|
| + port.host.executive.calls,
|
| + [['Xvfb', ':20', '-screen', '0', '1280x800x24', '-ac', '-dpi', '96']])
|
| +
|
| + def test_xvfb_started_with_display(self):
|
| + port = self.make_port()
|
| + port.host.environ['DISPLAY'] = ':0'
|
| + port.host.executive = MockExecutive(exit_code=0)
|
| + port.setup_test_run()
|
| + self.assertEqual(port.host.executive.calls, [['xdpyinfo', '-display', ':0']])
|
| +
|
| + def test_xvfb_started_with_display_set_but_no_x_server(self):
|
| + port = self.make_port()
|
| + port.host.environ['DISPLAY'] = ':0'
|
| + port.host.executive = MockExecutive(exit_code=1)
|
| + port.setup_test_run()
|
| + self.assertEqual(
|
| + port.host.executive.calls,
|
| + [
|
| + ['xdpyinfo', '-display', ':0'],
|
| + ['Xvfb', ':0', '-screen', '0', '1280x800x24', '-ac', '-dpi', '96']
|
| + ])
|
|
|