Changeset 192569 in webkit


Ignore:
Timestamp:
Nov 18, 2015 3:02:43 AM (8 years ago)
Author:
Carlos Garcia Campos
Message:

Unreviewed. Fix webkitpy tests after r192568.

Instead of ignoring exception when closing mock fds, use a helper
function that the unit test can override to do nothing.

  • Scripts/webkitpy/port/xvfbdriver.py:

(XvfbDriver._xvfb_close_pipe):
(XvfbDriver._xvfb_run):

  • Scripts/webkitpy/port/xvfbdriver_unittest.py:

(XvfbDriverTest.make_driver):

Location:
trunk/Tools
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r192568 r192569  
     12015-11-18  Carlos Garcia Campos  <cgarcia@igalia.com>
     2
     3        Unreviewed. Fix webkitpy tests after r192568.
     4
     5        Instead of ignoring exception when closing mock fds, use a helper
     6        function that the unit test can override to do nothing.
     7
     8        * Scripts/webkitpy/port/xvfbdriver.py:
     9        (XvfbDriver._xvfb_close_pipe):
     10        (XvfbDriver._xvfb_run):
     11        * Scripts/webkitpy/port/xvfbdriver_unittest.py:
     12        (XvfbDriverTest.make_driver):
     13
    1142015-11-18  Carlos Garcia Campos  <cgarcia@igalia.com>
    215
  • trunk/Tools/Scripts/webkitpy/port/xvfbdriver.py

    r192568 r192569  
    7373        return int(display_id)
    7474
     75    def _xvfb_close_pipe(self, pipe_fds):
     76        os.close(pipe_fds[0])
     77        os.close(pipe_fds[1])
     78
    7579    def _xvfb_run(self, environment):
    7680        read_fd, write_fd = self._xvfb_pipe()
     
    8286            display_id = self._xvfb_read_display_id(read_fd)
    8387
    84         try:
    85             os.close(read_fd)
    86             os.close(write_fd)
    87         except OSError:
    88             pass
     88        self._xvfb_close_pipe((read_fd, write_fd))
    8989
    9090        return display_id
  • trunk/Tools/Scripts/webkitpy/port/xvfbdriver_unittest.py

    r192568 r192569  
    5454        driver._xvfb_screen_depth = lambda: '24'
    5555        driver._xvfb_pipe = lambda: (3, 4)
    56         driver._xvfb_read_display_id = lambda(x): 1
     56        driver._xvfb_read_display_id = lambda x: 1
     57        driver._xvfb_close_pipe = lambda p: None
    5758        driver._environment = port.setup_environ_for_server(port.driver_name())
    5859        return driver
Note: See TracChangeset for help on using the changeset viewer.