Ejemplo n.º 1
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.º 2
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.º 3
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'])