third_party/blink/tools/blinkpy/web_tests/port/linux.py
def _find_display(self):
        """Tries to find a free X display, looping if necessary."""
        # The "xvfb-run" command uses :99 by default.
        for display_number in range(99, 120):
            if self.host.filesystem.exists('/tmp/.X%d-lock' % display_number):
                continue
            display = ':%d' % display_number
            exit_code = self.host.executive.run_command(
                ['xdpyinfo', '-display', display], return_exit_code=True)
            if exit_code == 1:
                return display
        return None
Tries to find a free X display, looping if necessary.
Tries to find a free X display, looping if necessary.
Tries to find a free X display looping if necessary .
def _find_display(self):
        for display_number in range(99, 120):
            if self.host.filesystem.exists('/tmp/.X%d-lock' % display_number):
                continue
            display = ':%d' % display_number
            exit_code = self.host.executive.run_command(
                ['xdpyinfo', '-display', display], return_exit_code=True)
            if exit_code == 1:
                return display
        return None
def _find_display ( self ) : for display_number in range ( 99 , 120 ) : if self . host . filesystem . exists ( '/tmp/.X%d-lock' % display_number ) : continue display = ':%d' % display_number exit_code = self . host . executive . run_command ( [ 'xdpyinfo' , '-display' , display ] , return_exit_code = True ) if exit_code == 1 : return display return None
Tries to find a free X display, looping if necessary.
Tries to find a free X display looping if necessary .
"""Tries to find a free X display, looping if necessary.""" # The "xvfb-run" command uses :99 by default.
self