def stop(self): WebKitDriver.stop(self) if getattr(self, '_xvfb_process', None): # FIXME: This should use Executive.kill_process os.kill(self._xvfb_process.pid, signal.SIGTERM) self._xvfb_process.wait() self._xvfb_process = None
def stop(self): WebKitDriver.stop(self) if getattr(self, '_xvfb_process', None): # FIXME: This should use Executive.kill_process os.kill(self._xvfb_process.pid, signal.SIGTERM) self._xvfb_process.wait() self._xvfb_process = None
def test_stop_cleans_up_properly(self): port = TestWebKitPort() driver = WebKitDriver(port, 0, pixel_tests=True) driver.start(True, []) last_tmpdir = port._filesystem.last_tmpdir self.assertNotEquals(last_tmpdir, None) driver.stop() self.assertFalse(port._filesystem.isdir(last_tmpdir))
def test_stop_cleans_up_properly(self): port = TestWebKitPort() driver = WebKitDriver(port, 0, pixel_tests=True) driver.start(True, []) last_tmpdir = port._filesystem.last_tmpdir self.assertNotEquals(last_tmpdir, None) driver.stop() self.assertFalse(port._filesystem.isdir(last_tmpdir))
def stop(self): WebKitDriver.stop(self) if getattr(self, '_xvfb_process', None): try: self._xvfb_process.terminate() self._xvfb_process.wait() except OSError: _log.warn("The driver is already terminated.") self._xvfb_process = None
def stop(self): WebKitDriver.stop(self) if getattr(self, '_xvfb_process', None): try: self._xvfb_process.terminate() self._xvfb_process.wait() except OSError: _log.warn("The driver is already terminated.") self._xvfb_process = None