| OLD | NEW |
| 1 # Copyright (c) 2010, Google Inc. All rights reserved. | 1 # Copyright (c) 2010, Google Inc. All rights reserved. |
| 2 # | 2 # |
| 3 # Redistribution and use in source and binary forms, with or without | 3 # Redistribution and use in source and binary forms, with or without |
| 4 # modification, are permitted provided that the following conditions are | 4 # modification, are permitted provided that the following conditions are |
| 5 # met: | 5 # met: |
| 6 # | 6 # |
| 7 # * Redistributions of source code must retain the above copyright | 7 # * Redistributions of source code must retain the above copyright |
| 8 # notice, this list of conditions and the following disclaimer. | 8 # notice, this list of conditions and the following disclaimer. |
| 9 # * Redistributions in binary form must reproduce the above | 9 # * Redistributions in binary form must reproduce the above |
| 10 # copyright notice, this list of conditions and the following disclaimer | 10 # copyright notice, this list of conditions and the following disclaimer |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 | 110 |
| 111 def test_chromium_revision(self): | 111 def test_chromium_revision(self): |
| 112 self.assertEqual(LayoutTestResults.results_from_string(self.example_full
_results_json).chromium_revision(), 1234) | 112 self.assertEqual(LayoutTestResults.results_from_string(self.example_full
_results_json).chromium_revision(), 1234) |
| 113 | 113 |
| 114 def test_actual_results(self): | 114 def test_actual_results(self): |
| 115 results = LayoutTestResults.results_from_string(self.example_full_result
s_json) | 115 results = LayoutTestResults.results_from_string(self.example_full_result
s_json) |
| 116 self.assertEqual(results.result_for_test("fast/dom/prototype-banana.html
").actual_results(), "PASS") | 116 self.assertEqual(results.result_for_test("fast/dom/prototype-banana.html
").actual_results(), "PASS") |
| 117 self.assertEqual(results.result_for_test("fast/dom/prototype-taco.html")
.actual_results(), "PASS TEXT") | 117 self.assertEqual(results.result_for_test("fast/dom/prototype-taco.html")
.actual_results(), "PASS TEXT") |
| 118 self.assertFalse(results.result_for_test("nonexistant.html")) | 118 self.assertFalse(results.result_for_test("nonexistant.html")) |
| 119 | 119 |
| 120 def test_unexpected_mismatch_results(self): | 120 def test_didnt_run_as_expected_results(self): |
| 121 results = LayoutTestResults.results_from_string(self.example_full_result
s_json) | 121 results = LayoutTestResults.results_from_string(self.example_full_result
s_json) |
| 122 self.assertEqual( | 122 self.assertEqual( |
| 123 [r.test_name() for r in results.unexpected_mismatch_results()], | 123 [r.test_name() for r in results.didnt_run_as_expected_results()], |
| 124 [ | 124 [ |
| 125 'fast/dom/prototype-banana.html', |
| 126 'fast/dom/prototype-crashy.html', |
| 125 'fast/dom/prototype-inheritance.html', | 127 'fast/dom/prototype-inheritance.html', |
| 128 'fast/dom/prototype-newtest.html', |
| 129 'fast/dom/prototype-strawberry.html', |
| 126 'fast/dom/prototype-taco.html', | 130 'fast/dom/prototype-taco.html', |
| 127 'svg/dynamic-updates/SVGFEDropShadowElement-dom-stdDeviation-att
r.html' | 131 'svg/dynamic-updates/SVGFEDropShadowElement-dom-stdDeviation-att
r.html', |
| 128 ]) | 132 ]) |
| 129 | |
| 130 def test_missing_baseline(self): | |
| 131 results = LayoutTestResults.results_from_string(self.example_full_result
s_json) | |
| 132 missing_results = results.missing_results() | |
| 133 self.assertEqual(len(missing_results), 1) | |
| 134 self.assertEqual(missing_results[0].test_name(), "fast/dom/prototype-new
test.html") | |
| OLD | NEW |