Ejemplo n.º 1
0
 def __init__(self, symbol_list=None, feature_list=None,
              expectations_file=None, skips_file=None, **kwargs):
     self.symbol_list = symbol_list
     self.feature_list = feature_list
     self.expectations_file = expectations_file
     self.skips_file = skips_file
     WebKitPort.__init__(self, **kwargs)
Ejemplo n.º 2
0
 def __init__(self, symbols_string=None,
              expectations_file=None, skips_file=None, host=None, config=None,
              **kwargs):
     self.symbols_string = symbols_string  # Passing "" disables all staticly-detectable features.
     host = host or MockSystemHost()
     config = config or MockConfig()
     WebKitPort.__init__(self, host=host, config=config, **kwargs)
 def __init__(self, symbol_list=None, feature_list=None,
              expectations_file=None, skips_file=None, **kwargs):
     self.symbol_list = symbol_list
     self.feature_list = feature_list
     self.expectations_file = expectations_file
     self.skips_file = skips_file
     WebKitPort.__init__(self, **kwargs)
Ejemplo n.º 4
0
    def __init__(self, host, port_name, **kwargs):
        WebKitPort.__init__(self, host, port_name, **kwargs)

        allowed_port_names = self.VERSION_FALLBACK_ORDER + [self.operating_system() + "-future"]
        port_name = port_name.replace('-wk2', '')
        assert port_name in allowed_port_names, "%s is not in %s" % (port_name, allowed_port_names)
        self._version = self._strip_port_name_prefix(port_name)
Ejemplo n.º 5
0
    def __init__(self, host, port_name, **kwargs):
        WebKitPort.__init__(self, host, port_name, **kwargs)

        allowed_port_names = self.VERSION_FALLBACK_ORDER + [self.operating_system() + "-future"]
        port_name = port_name.replace('-wk2', '')
        assert port_name in allowed_port_names, "%s is not in %s" % (port_name, allowed_port_names)
        self._version = self._strip_port_name_prefix(port_name)
Ejemplo n.º 6
0
 def __init__(self, symbols_string=None,
              expectations_file=None, skips_file=None, host=None, config=None,
              **kwargs):
     self.symbols_string = symbols_string  # Passing "" disables all staticly-detectable features.
     host = host or MockSystemHost()
     config = config or MockConfig()
     WebKitPort.__init__(self, host=host, config=config, **kwargs)
Ejemplo n.º 7
0
    def __init__(self, *args, **kwargs):
        WebKitPort.__init__(self, *args, **kwargs)

        self._jhbuild_wrapper_path = self.path_from_webkit_base(
            'Tools', 'efl', 'run-with-jhbuild')

        self.set_option_default('wrapper', self._jhbuild_wrapper_path)
Ejemplo n.º 8
0
 def test_runtime_feature_list(self):
     port = WebKitPort(MockSystemHost())
     port._executive.run_command = lambda command, cwd=None, error_handler=None: "Nonsense"
     # runtime_features_list returns None when its results are meaningless (it couldn't run DRT or parse the output, etc.)
     self.assertEquals(port._runtime_feature_list(), None)
     port._executive.run_command = lambda command, cwd=None, error_handler=None: "SupportedFeatures:foo bar"
     self.assertEquals(port._runtime_feature_list(), ['foo', 'bar'])
Ejemplo n.º 9
0
 def test_runtime_feature_list(self):
     port = WebKitPort(MockHost())
     port._executive.run_command = lambda command, cwd=None, error_handler=None: "Nonsense"
     # runtime_features_list returns None when its results are meaningless (it couldn't run DRT or parse the output, etc.)
     self.assertEquals(port._runtime_feature_list(), None)
     port._executive.run_command = lambda command, cwd=None, error_handler=None: "SupportedFeatures:foo bar"
     self.assertEquals(port._runtime_feature_list(), ['foo', 'bar'])
Ejemplo n.º 10
0
 def __init__(self, symbols_string=None, feature_list=None,
              expectations_file=None, skips_file=None, host=None,
              **kwargs):
     self.symbols_string = symbols_string  # Passing "" disables all staticly-detectable features.
     self.feature_list = feature_list  # Passing [] disables all runtime-detectable features.
     host = host or MockSystemHost()
     WebKitPort.__init__(self, host=host, **kwargs)
Ejemplo n.º 11
0
    def __init__(self, *args, **kwargs):
        WebKitPort.__init__(self, *args, **kwargs)

#if ENABLE(TIZEN_WEBKIT2_EFL_WTR)
# Please do not enable jhbuild since Tizen is not using it
        #self._jhbuild_wrapper_path = self.path_from_webkit_base('Tools', 'efl', 'run-with-jhbuild')
        #self.set_option_default('wrapper', self._jhbuild_wrapper_path)
#endif
        self.webprocess_cmd_prefix = self.get_option('webprocess_cmd_prefix')
Ejemplo n.º 12
0
    def __init__(self, host, port_name, **kwargs):
        WebKitPort.__init__(self, host, port_name, **kwargs)

        # FIXME: This will allow WebKitPort.baseline_search_path and WebKitPort._skipped_file_search_paths
        # to do the right thing, but doesn't include support for qt-4.8 or qt-arm (seen in LayoutTests/platform) yet.
        self._operating_system = port_name.replace('qt-', '')

        # FIXME: Why is this being set at all?
        self._version = self.operating_system()
Ejemplo n.º 13
0
    def __init__(self, host, port_name, **kwargs):
        WebKitPort.__init__(self, host, port_name, **kwargs)

        # FIXME: This will allow WebKitPort.baseline_search_path and WebKitPort._skipped_file_search_paths
        # to do the right thing, but doesn't include support for qt-4.8 or qt-arm (seen in LayoutTests/platform) yet.
        self._operating_system = port_name.replace('qt-', '')

        # FIXME: Why is this being set at all?
        self._version = self.operating_system()
Ejemplo n.º 14
0
 def __init__(self, symbol_list=None, feature_list=None,
              expectations_file=None, skips_file=None,
              executive=None, filesystem=None, user=None,
              **kwargs):
     self.symbol_list = symbol_list
     self.feature_list = feature_list
     executive = executive or MockExecutive(should_log=False)
     filesystem = filesystem or MockFileSystem()
     user = user or MockUser()
     WebKitPort.__init__(self, executive=executive, filesystem=filesystem, user=MockUser(), **kwargs)
Ejemplo n.º 15
0
    def __init__(self, port_name=None, os_version_string=None, **kwargs):
        port_name = port_name or 'mac'

        if port_name == 'mac':
            self._version = os_version(os_version_string)
            port_name = port_name + '-' + self._version
        else:
            self._version = port_name[4:]
            assert self._version in self.SUPPORTED_VERSIONS

        WebKitPort.__init__(self, port_name=port_name, **kwargs)
Ejemplo n.º 16
0
 def __init__(self,
              symbols_string=None,
              feature_list=None,
              expectations_file=None,
              skips_file=None,
              host=None,
              **kwargs):
     self.symbols_string = symbols_string  # Passing "" disables all staticly-detectable features.
     self.feature_list = feature_list  # Passing [] disables all runtime-detectable features.
     host = host or MockHost()
     WebKitPort.__init__(self, host=host, **kwargs)
Ejemplo n.º 17
0
    def __init__(self, sys_platform=None, **kwargs):
        WebKitPort.__init__(self, **kwargs)
        self._operating_system = self._operating_system_for_platform(sys_platform or sys.platform)
        self._version = self._operating_system

        # FIXME: This will allow WebKitPort.baseline_search_path and WebKitPort._skipped_file_search_paths
        # to do the right thing, but doesn't include support for qt-4.8 or qt-arm (seen in LayoutTests/platform) yet.
        name_components = [self.port_name]
        if self._operating_system:
            name_components.append(self._operating_system)
        self._name = "-".join(name_components)
Ejemplo n.º 18
0
    def test_default_options(self):
        # The WebKit ports override new-run-webkit-test default options.
        options = MockOptions(pixel_tests=None, time_out_ms=None)
        port = WebKitPort(options=options)
        self.assertEquals(port._options.pixel_tests, False)
        self.assertEquals(port._options.time_out_ms, 35000)

        # Note that we don't override options if specified by the user.
        options = MockOptions(pixel_tests=True, time_out_ms=6000)
        port = WebKitPort(options=options)
        self.assertEquals(port._options.pixel_tests, True)
        self.assertEquals(port._options.time_out_ms, 6000)
Ejemplo n.º 19
0
 def __init__(self, port_name=None, os_version_string=None, **kwargs):
     port_name = port_name or 'mac'
     WebKitPort.__init__(self, port_name=port_name, **kwargs)
     if port_name == 'mac':
         self._version = os_version(os_version_string)
         self._name = port_name + '-' + self._version
     else:
         self._version = port_name[4:]
         assert self._version in self.SUPPORTED_VERSIONS
     self._operating_system = 'mac'
     if not hasattr(self._options, 'time-out-ms') or self._options.time_out_ms is None:
         self._options.time_out_ms = 35000
Ejemplo n.º 20
0
    def __init__(self, sys_platform=None, **kwargs):
        WebKitPort.__init__(self, **kwargs)
        self._operating_system = self._operating_system_for_platform(
            sys_platform or sys.platform)
        self._version = self._operating_system

        # FIXME: This will allow WebKitPort.baseline_search_path and WebKitPort._skipped_file_search_paths
        # to do the right thing, but doesn't include support for qt-4.8 or qt-arm (seen in LayoutTests/platform) yet.
        name_components = [self.port_name]
        if self._operating_system:
            name_components.append(self._operating_system)
        self._name = "-".join(name_components)
Ejemplo n.º 21
0
    def __init__(self, host, port_name=None, **kwargs):
        port_name = port_name or self.port_name
        WebKitPort.__init__(self, host, port_name=None, **kwargs)
        self._operating_system = host.platform.os_name
        self._version = self.operating_system()

        # FIXME: This will allow WebKitPort.baseline_search_path and WebKitPort._skipped_file_search_paths
        # to do the right thing, but doesn't include support for qt-4.8 or qt-arm (seen in LayoutTests/platform) yet.

        if port_name != self.port_name:
            self._name = port_name
        else:
            name_components = [self.port_name]
            if self.operating_system():
                name_components.append(self.operating_system())
            self._name = "-".join(name_components)
Ejemplo n.º 22
0
    def __init__(self, host, port_name=None, os_version_string=None, **kwargs):
        port_name = port_name or self.port_name
        WebKitPort.__init__(self, host, port_name=port_name, **kwargs)

        # FIXME: This sort of parsing belongs in factory.py!
        if port_name == '%s-wk2' % self.port_name:
            port_name = self.port_name
            # FIXME: This may be wrong, since options is a global property, and the port_name is specific to this object?
            self.set_option_default('webkit_test_runner', True)

        if port_name == self.port_name:
            self._version = self._detect_version(os_version_string) or self.FUTURE_VERSION
            self._name = self.port_name + '-' + self._version
        else:
            assert port_name in self.VERSION_FALLBACK_ORDER, "%s is not in %s" % (port_name, self.VERSION_FALLBACK_ORDER)
            self._version = self._strip_port_name_prefix(port_name)
Ejemplo n.º 23
0
    def __init__(self, host, port_name=None, os_version_string=None, **kwargs):
        port_name = port_name or self.port_name
        WebKitPort.__init__(self, host, port_name=port_name, **kwargs)

        # FIXME: This sort of parsing belongs in factory.py!
        if port_name == '%s-wk2' % self.port_name:
            port_name = self.port_name
            # FIXME: This may be wrong, since options is a global property, and the port_name is specific to this object?
            self.set_option_default('webkit_test_runner', True)

        if port_name == self.port_name:
            self._version = self._detect_version(os_version_string) or self.FUTURE_VERSION
            self._name = self.port_name + '-' + self._version
        else:
            allowed_port_names = self.VERSION_FALLBACK_ORDER + [self._operating_system + "-future"]
            assert port_name in allowed_port_names, "%s is not in %s" % (port_name, allowed_port_names)
            self._version = self._strip_port_name_prefix(port_name)
Ejemplo n.º 24
0
 def default_child_processes(self):
     # FIXME: new-run-webkit-tests is unstable on Mac running more than
     # four threads in parallel.
     # See https://bugs.webkit.org/show_bug.cgi?id=36622
     child_processes = WebKitPort.default_child_processes(self)
     if not self._multiprocessing_is_available and child_processes > 4:
         return 4
     return child_processes
Ejemplo n.º 25
0
 def setup_environ_for_server(self, server_name=None):
     environment = WebKitPort.setup_environ_for_server(self, server_name)
     environment['GTK_MODULES'] = 'gail'
     environment['LIBOVERLAY_SCROLLBAR'] = '0'
     environment['TEST_RUNNER_INJECTED_BUNDLE_FILENAME'] = self._build_path('Libraries', 'libTestRunnerInjectedBundle.la')
     environment['TEST_RUNNER_TEST_PLUGIN_PATH'] = self._build_path('TestNetscapePlugin', '.libs')
     environment['WEBKIT_INSPECTOR_PATH'] = self._build_path('Programs', 'resources', 'inspector')
     return environment
Ejemplo n.º 26
0
 def __init__(
     self,
     symbol_list=None,
     feature_list=None,
     expectations_file=None,
     skips_file=None,
     executive=None,
     filesystem=None,
     user=None,
     **kwargs
 ):
     self.symbol_list = symbol_list
     self.feature_list = feature_list
     executive = executive or MockExecutive(should_log=False)
     filesystem = filesystem or MockFileSystem()
     user = user or MockUser()
     WebKitPort.__init__(self, executive=executive, filesystem=filesystem, user=MockUser(), **kwargs)
Ejemplo n.º 27
0
 def setup_environ_for_server(self, server_name=None):
     clean_env = WebKitPort.setup_environ_for_server(self, server_name)
     clean_env['QTWEBKIT_PLUGIN_PATH'] = self._build_path('lib/plugins')
     self._copy_value_from_environ_if_set(clean_env, 'QT_DRT_WEBVIEW_MODE')
     self._copy_value_from_environ_if_set(clean_env, 'DYLD_IMAGE_SUFFIX')
     self._copy_value_from_environ_if_set(clean_env, 'QT_WEBKIT_LOG')
     self._copy_value_from_environ_if_set(clean_env, 'DISABLE_NI_WARNING')
     self._copy_value_from_environ_if_set(clean_env, 'QT_WEBKIT_PAUSE_UI_PROCESS')
     return clean_env
Ejemplo n.º 28
0
 def setup_environ_for_server(self, server_name=None):
     clean_env = WebKitPort.setup_environ_for_server(self, server_name)
     clean_env['QTWEBKIT_PLUGIN_PATH'] = self._build_path('lib/plugins')
     self._copy_value_from_environ_if_set(clean_env, 'QT_DRT_WEBVIEW_MODE')
     self._copy_value_from_environ_if_set(clean_env, 'DYLD_IMAGE_SUFFIX')
     self._copy_value_from_environ_if_set(clean_env, 'QT_WEBKIT_LOG')
     self._copy_value_from_environ_if_set(clean_env, 'DISABLE_NI_WARNING')
     self._copy_value_from_environ_if_set(clean_env, 'QT_WEBKIT_PAUSE_UI_PROCESS')
     return clean_env
Ejemplo n.º 29
0
 def setup_environ_for_server(self, server_name=None):
     environment = WebKitPort.setup_environ_for_server(self, server_name)
     environment['GTK_MODULES'] = 'gail'
     environment['LIBOVERLAY_SCROLLBAR'] = '0'
     environment['TEST_RUNNER_INJECTED_BUNDLE_FILENAME'] = self._build_path('Libraries', 'libTestRunnerInjectedBundle.la')
     environment['TEST_RUNNER_TEST_PLUGIN_PATH'] = self._build_path('TestNetscapePlugin', '.libs')
     environment['WEBKIT_INSPECTOR_PATH'] = self._build_path('Programs', 'resources', 'inspector')
     environment['WEBKIT_TOP_LEVEL'] = self._config.webkit_base_dir()
     if self.get_option('webkit_test_runner'):
         # FIXME: This is a workaround to ensure that testing with WebKitTestRunner is started with
         # a non-existing cache. This should be removed when (and if) it will be possible to properly
         # set the cache directory path through a WebKitWebContext.
         environment['XDG_CACHE_HOME'] = self._filesystem.join(self.results_directory(), 'appcache')
     return environment
Ejemplo n.º 30
0
 def setup_environ_for_server(self, server_name=None):
     environment = WebKitPort.setup_environ_for_server(self, server_name)
     environment["GTK_MODULES"] = "gail"
     environment["GSETTINGS_BACKEND"] = "memory"
     environment["LIBOVERLAY_SCROLLBAR"] = "0"
     environment["TEST_RUNNER_INJECTED_BUNDLE_FILENAME"] = self._build_path(
         "Libraries", "libTestRunnerInjectedBundle.la"
     )
     environment["TEST_RUNNER_TEST_PLUGIN_PATH"] = self._build_path("TestNetscapePlugin", ".libs")
     environment["WEBKIT_INSPECTOR_PATH"] = self._build_path("Programs", "resources", "inspector")
     environment["AUDIO_RESOURCES_PATH"] = self._filesystem.join(
         self._config.webkit_base_dir(), "Source", "WebCore", "platform", "audio", "resources"
     )
     if self.get_option("webkit_test_runner"):
         # FIXME: This is a workaround to ensure that testing with WebKitTestRunner is started with
         # a non-existing cache. This should be removed when (and if) it will be possible to properly
         # set the cache directory path through a WebKitWebContext.
         environment["XDG_CACHE_HOME"] = self._filesystem.join(self.results_directory(), "appcache")
     return environment
Ejemplo n.º 31
0
 def setup_environ_for_server(self, server_name=None):
     environment = WebKitPort.setup_environ_for_server(self, server_name)
     environment['GTK_MODULES'] = 'gail'
     environment['LIBOVERLAY_SCROLLBAR'] = '0'
     environment['TEST_RUNNER_INJECTED_BUNDLE_FILENAME'] = self._build_path(
         'Libraries', 'libTestRunnerInjectedBundle.la')
     environment['TEST_RUNNER_TEST_PLUGIN_PATH'] = self._build_path(
         'TestNetscapePlugin', '.libs')
     environment['WEBKIT_INSPECTOR_PATH'] = self._build_path(
         'Programs', 'resources', 'inspector')
     environment['AUDIO_RESOURCES_PATH'] = self._filesystem.join(
         self._config.webkit_base_dir(), 'Source', 'WebCore', 'platform',
         'audio', 'resources')
     if self.get_option('webkit_test_runner'):
         # FIXME: This is a workaround to ensure that testing with WebKitTestRunner is started with
         # a non-existing cache. This should be removed when (and if) it will be possible to properly
         # set the cache directory path through a WebKitWebContext.
         environment['XDG_CACHE_HOME'] = self._filesystem.join(
             self.results_directory(), 'appcache')
     return environment
Ejemplo n.º 32
0
 def test_runtime_feature_list(self):
     port = WebKitPort(executive=MockExecutive())
     port._executive.run_command = lambda command, cwd=None, error_handler=None: "Nonsense"
     self.assertEquals(port._runtime_feature_list(), [])
     port._executive.run_command = lambda command, cwd=None, error_handler=None: "SupportedFeatures:foo bar"
     self.assertEquals(port._runtime_feature_list(), ['foo', 'bar'])
Ejemplo n.º 33
0
 def setup_environ_for_server(self, server_name=None):
     clean_env = WebKitPort.setup_environ_for_server(self, server_name)
     clean_env['QTWEBKIT_PLUGIN_PATH'] = self._build_path('lib/plugins')
     self._copy_value_from_environ_if_set(clean_env, 'QT_DRT_WEBVIEW_MODE')
     return clean_env
Ejemplo n.º 34
0
 def setup_environ_for_server(self, server_name=None):
     clean_env = WebKitPort.setup_environ_for_server(self, server_name)
     clean_env['QTWEBKIT_PLUGIN_PATH'] = self._build_path('lib/plugins')
     self._copy_value_from_environ_if_set(clean_env, 'QT_DRT_WEBVIEW_MODE')
     return clean_env
Ejemplo n.º 35
0
 def __init__(self):
     WebKitPort.__init__(self, filesystem=test_config.filesystem)
     self._platforms_by_directory = dict([
         (self._webkit_baseline_path(p), p)
         for p in test_config.platforms
     ])
Ejemplo n.º 36
0
 def setup_environ_for_server(self, server_name=None):
     env = WebKitPort.setup_environ_for_server(self, server_name)
     env['QTWEBKIT_PLUGIN_PATH'] = self._build_path('lib/plugins')
     return env
Ejemplo n.º 37
0
 def __init__(self):
     WebKitPort.__init__(self, filesystem=mock_filesystem)
     self._name = 'mac'
Ejemplo n.º 38
0
 def __init__(self, host, **kwargs):
     WebKitPort.__init__(self, host, **kwargs)
     self._version = self.port_name
Ejemplo n.º 39
0
 def __init__(self, **kwargs):
     kwargs.setdefault('port_name', 'mac' + self.version())
     WebKitPort.__init__(self, **kwargs)
Ejemplo n.º 40
0
 def __init__(self, port_name=None, options=None):
     if port_name is None:
         port_name = 'win'
     WebKitPort.__init__(self, port_name, options)
Ejemplo n.º 41
0
 def __init__(self, port_name=None, options=None):
     if port_name is None:
         port_name = 'win'
     WebKitPort.__init__(self, port_name, options)
Ejemplo n.º 42
0
 def __init__(self, port_name=None, **kwargs):
     port_name = port_name or 'win'
     WebKitPort.__init__(self, port_name=port_name, **kwargs)
     self._version = 'win7'
     self._operating_system = 'win'
Ejemplo n.º 43
0
 def __init__(self, port_name=None, **kwargs):
     port_name = port_name or 'win'
     WebKitPort.__init__(self, port_name=port_name, **kwargs)
     self._version = 'win7'
     self._operating_system = 'win'
Ejemplo n.º 44
0
 def __init__(self, host, **kwargs):
     WebKitPort.__init__(self, host, **kwargs)
     self._version = self.port_name
Ejemplo n.º 45
0
 def __init__(self, port_name=None, options=None):
     if port_name is None:
         port_name = 'mac' + self.version()
     WebKitPort.__init__(self, port_name, options)
Ejemplo n.º 46
0
 def test_runtime_feature_list(self):
     port = WebKitPort(executive=MockExecutive())
     port._executive.run_command = lambda command, cwd=None, error_handler=None: "Nonsense"
     self.assertEquals(port._runtime_feature_list(), [])
     port._executive.run_command = lambda command, cwd=None, error_handler=None: "SupportedFeatures:foo bar"
     self.assertEquals(port._runtime_feature_list(), ["foo", "bar"])
Ejemplo n.º 47
0
 def path_to_test_expectations_file(self):
     if self.expectations_file:
         return self.expectations_file
     return WebKitPort.path_to_test_expectations_file(self)
Ejemplo n.º 48
0
 def __init__(self, port_name=None, options=None):
     if port_name is None:
         port_name = "mac" + self.version()
     WebKitPort.__init__(self, port_name, options)
Ejemplo n.º 49
0
    def __init__(self, *args, **kwargs):
        WebKitPort.__init__(self, *args, **kwargs)

        self._jhbuild_wrapper_path = self.path_from_webkit_base("Tools", "efl", "run-with-jhbuild")

        self.set_option_default("wrapper", self._jhbuild_wrapper_path)
Ejemplo n.º 50
0
 def __init__(self, host):
     WebKitPort.__init__(self, host, 'mac')
     self._platforms_by_directory = dict([
         (self._webkit_baseline_path(p), p)
         for p in test_config.platforms
     ])
Ejemplo n.º 51
0
 def __init__(self):
     WebKitPort.__init__(self, filesystem=test_config.filesystem)
     self._platforms_by_directory = dict(
         [(self._webkit_baseline_path(p), p) for p in test_config.platforms])
Ejemplo n.º 52
0
    def baseline_path(self):
        if self.version() != 'future':
            return WebKitPort.baseline_path(self)

        assert(self._name[-7:] == '-future')
        return self._webkit_baseline_path(self._name[:-7])
Ejemplo n.º 53
0
 def __init__(self, **kwargs):
     kwargs.setdefault('port_name', 'gtk')
     WebKitPort.__init__(self, **kwargs)
 def __init__(self):
     # FIXME: This should use MockExecutive and MockUser as well.
     WebKitPort.__init__(self, filesystem=mock_filesystem)
Ejemplo n.º 55
0
 def setup_environ_for_server(self, server_name=None):
     env = WebKitPort.setup_environ_for_server(self, server_name)
     env['QTWEBKIT_PLUGIN_PATH'] = self._build_path('lib/plugins')
     return env