| Index: third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/models/test_run_results_unittest.py
|
| diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/models/test_run_results_unittest.py b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/models/test_run_results_unittest.py
|
| index 9826b457d4e13beac9ae7178e31ec09765f55bb7..a658f828ea8084726b904a14671373a9b872d9b7 100644
|
| --- a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/models/test_run_results_unittest.py
|
| +++ b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/models/test_run_results_unittest.py
|
| @@ -84,8 +84,10 @@ def summarized_results(port, expected, passing, flaky, only_include_failing=Fals
|
| initial_results.add(get_result('failures/expected/leak.html'), expected, test_is_slow)
|
| else:
|
| initial_results.add(get_result('passes/text.html', test_expectations.TIMEOUT, run_time=1), expected, test_is_slow)
|
| - initial_results.add(get_result('failures/expected/audio.html', test_expectations.CRASH, run_time=0.049), expected, test_is_slow)
|
| - initial_results.add(get_result('failures/expected/timeout.html', test_expectations.TEXT, run_time=0.05), expected, test_is_slow)
|
| + initial_results.add(get_result('failures/expected/audio.html',
|
| + test_expectations.CRASH, run_time=0.049), expected, test_is_slow)
|
| + initial_results.add(get_result('failures/expected/timeout.html',
|
| + test_expectations.TEXT, run_time=0.05), expected, test_is_slow)
|
| initial_results.add(get_result('failures/expected/crash.html', test_expectations.TIMEOUT), expected, test_is_slow)
|
| initial_results.add(get_result('failures/expected/leak.html', test_expectations.TIMEOUT), expected, test_is_slow)
|
|
|
| @@ -152,12 +154,14 @@ def summarized_results(port, expected, passing, flaky, only_include_failing=Fals
|
|
|
|
|
| class InterpretTestFailuresTest(unittest.TestCase):
|
| +
|
| def setUp(self):
|
| host = MockHost()
|
| self.port = host.port_factory.get(port_name='test')
|
|
|
| def test_interpret_test_failures(self):
|
| - test_dict = test_run_results._interpret_test_failures([test_failures.FailureReftestMismatchDidNotOccur(self.port.abspath_for_test('foo/reftest-expected-mismatch.html'))])
|
| + test_dict = test_run_results._interpret_test_failures(
|
| + [test_failures.FailureReftestMismatchDidNotOccur(self.port.abspath_for_test('foo/reftest-expected-mismatch.html'))])
|
| self.assertEqual(len(test_dict), 0)
|
|
|
| test_dict = test_run_results._interpret_test_failures([test_failures.FailureMissingAudio()])
|
| @@ -174,6 +178,7 @@ class InterpretTestFailuresTest(unittest.TestCase):
|
|
|
|
|
| class SummarizedResultsTest(unittest.TestCase):
|
| +
|
| def setUp(self):
|
| host = MockHost(initialize_scm_by_default=False)
|
| self.port = host.port_factory.get(port_name='test')
|
| @@ -184,13 +189,16 @@ class SummarizedResultsTest(unittest.TestCase):
|
|
|
| def test_num_failures_by_type(self):
|
| summary = summarized_results(self.port, expected=False, passing=False, flaky=False)
|
| - self.assertEquals(summary['num_failures_by_type'], {'CRASH': 1, 'MISSING': 0, 'TEXT': 1, 'IMAGE': 1, 'NEEDSREBASELINE': 0, 'NEEDSMANUALREBASELINE': 0, 'PASS': 1, 'REBASELINE': 0, 'SKIP': 0, 'SLOW': 0, 'TIMEOUT': 3, 'IMAGE+TEXT': 0, 'LEAK': 0, 'FAIL': 0, 'AUDIO': 0, 'WONTFIX': 0})
|
| + self.assertEquals(summary['num_failures_by_type'], {'CRASH': 1, 'MISSING': 0, 'TEXT': 1, 'IMAGE': 1, 'NEEDSREBASELINE': 0, 'NEEDSMANUALREBASELINE': 0,
|
| + 'PASS': 1, 'REBASELINE': 0, 'SKIP': 0, 'SLOW': 0, 'TIMEOUT': 3, 'IMAGE+TEXT': 0, 'LEAK': 0, 'FAIL': 0, 'AUDIO': 0, 'WONTFIX': 0})
|
|
|
| summary = summarized_results(self.port, expected=True, passing=False, flaky=False)
|
| - self.assertEquals(summary['num_failures_by_type'], {'CRASH': 1, 'MISSING': 0, 'TEXT': 0, 'IMAGE': 0, 'NEEDSREBASELINE': 0, 'NEEDSMANUALREBASELINE': 0, 'PASS': 1, 'REBASELINE': 0, 'SKIP': 0, 'SLOW': 0, 'TIMEOUT': 1, 'IMAGE+TEXT': 0, 'LEAK': 1, 'FAIL': 0, 'AUDIO': 1, 'WONTFIX': 0})
|
| + self.assertEquals(summary['num_failures_by_type'], {'CRASH': 1, 'MISSING': 0, 'TEXT': 0, 'IMAGE': 0, 'NEEDSREBASELINE': 0, 'NEEDSMANUALREBASELINE': 0,
|
| + 'PASS': 1, 'REBASELINE': 0, 'SKIP': 0, 'SLOW': 0, 'TIMEOUT': 1, 'IMAGE+TEXT': 0, 'LEAK': 1, 'FAIL': 0, 'AUDIO': 1, 'WONTFIX': 0})
|
|
|
| summary = summarized_results(self.port, expected=False, passing=True, flaky=False)
|
| - self.assertEquals(summary['num_failures_by_type'], {'CRASH': 0, 'MISSING': 0, 'TEXT': 0, 'IMAGE': 0, 'NEEDSREBASELINE': 0, 'NEEDSMANUALREBASELINE': 0, 'PASS': 5, 'REBASELINE': 0, 'SKIP': 1, 'SLOW': 0, 'TIMEOUT': 0, 'IMAGE+TEXT': 0, 'LEAK': 0, 'FAIL': 0, 'AUDIO': 0, 'WONTFIX': 0})
|
| + self.assertEquals(summary['num_failures_by_type'], {'CRASH': 0, 'MISSING': 0, 'TEXT': 0, 'IMAGE': 0, 'NEEDSREBASELINE': 0, 'NEEDSMANUALREBASELINE': 0,
|
| + 'PASS': 5, 'REBASELINE': 0, 'SKIP': 1, 'SLOW': 0, 'TIMEOUT': 0, 'IMAGE+TEXT': 0, 'LEAK': 0, 'FAIL': 0, 'AUDIO': 0, 'WONTFIX': 0})
|
|
|
| def test_chromium_revision(self):
|
| self.port._options.builder_name = 'dummy builder'
|
|
|