예제 #1
0
    def __init__(self, port):
        self._port = port
        _log.info('Using port %s' % self._port.name())
        _log.info('Test configuration: %s' % self._port.test_configuration())
        _log.info('Using display server %s' % (self._port._display_server))

        self._display_driver = self._port._driver_class()(self._port,
                                                          worker_number=0,
                                                          pixel_tests=False,
                                                          no_timeout=True)
        if not self._display_driver.check_driver(self._port):
            raise RuntimeError("Failed to check driver %s" %
                               self._display_driver.__class__.__name__)

        driver = create_driver(self._port)
        _log.info('Using driver at %s' % (driver.binary_path()))
        _log.info('Browser: %s' % (driver.browser_name()))

        _log.info('Parsing expectations')
        self._tests_dir = WebKitFinder(
            self._port.host.filesystem).path_from_webkit_base('WebDriverTests')
        expectations_file = os.path.join(self._tests_dir,
                                         'TestExpectations.json')
        build_type = 'Debug' if self._port.get_option('debug') else 'Release'
        self._expectations = TestExpectations(self._port.name(),
                                              expectations_file, build_type)

        env = self._display_driver._setup_environ_for_test()
        self._runners = [
            runner_cls(self._port, driver, env, self._expectations)
            for runner_cls in self.RUNNER_CLASSES
        ]
    def __init__(self, port, display_driver):
        self._port = port
        self._display_driver = display_driver
        self._driver = create_driver(self._port)
        _log.info('Using driver at %s' % (self._driver.binary_path()))
        _log.info('Browser: %s' % (self._driver.browser_name()))

        self._results = []
        self._server = WebDriverW3CWebServer(self._port)
예제 #3
0
    def __init__(self, port):
        self._port = port
        _log.info('Using port %s' % self._port.name())
        _log.info('Test configuration: %s' % self._port.test_configuration())
        _log.info('Using display server %s' % (self._port._display_server))

        self._display_driver = self._port.create_driver(
            worker_number=0, no_timeout=True)._make_driver(pixel_tests=False)
        if not self._display_driver.check_driver(self._port):
            raise RuntimeError("Failed to check driver %s" %
                               self._display_driver.__class__.__name__)

        driver = create_driver(self._port)
        _log.info('Using driver at %s' % (driver.binary_path()))
        _log.info('Browser: %s' % (driver.browser_name()))

        self._runners = [
            runner_cls(self._port, driver, self._display_driver)
            for runner_cls in self.RUNNER_CLASSES
        ]
예제 #4
0
def create_webdriver(port):
    return create_driver(port)