diff options
author | Steve Block <steveblock@google.com> | 2010-05-26 10:11:43 +0100 |
---|---|---|
committer | Steve Block <steveblock@google.com> | 2010-05-27 11:14:42 +0100 |
commit | e78cbe89e6f337f2f1fe40315be88f742b547151 (patch) | |
tree | d778000b84a04f24bbad50c7fa66244365e960e9 /WebKitTools/Scripts/webkitpy/layout_tests/layout_package | |
parent | 7b582e96e4e909ed7dba1e07153d20fbddaec3f7 (diff) | |
download | external_webkit-e78cbe89e6f337f2f1fe40315be88f742b547151.zip external_webkit-e78cbe89e6f337f2f1fe40315be88f742b547151.tar.gz external_webkit-e78cbe89e6f337f2f1fe40315be88f742b547151.tar.bz2 |
Merge WebKit at r60074: Initial merge by git
Change-Id: I18a2dc5439e36c928351ea829d8fb4e39b062fc7
Diffstat (limited to 'WebKitTools/Scripts/webkitpy/layout_tests/layout_package')
3 files changed, 39 insertions, 37 deletions
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/dump_render_tree_thread.py b/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/dump_render_tree_thread.py index 6957fcd..09f9ac7 100644 --- a/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/dump_render_tree_thread.py +++ b/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/dump_render_tree_thread.py @@ -425,7 +425,8 @@ class TestShellThread(threading.Thread): # are generating a new baseline. (Otherwise, an image from a # previous run will be copied into the baseline.) image_hash = test_info.image_hash() - if image_hash and self._test_args.new_baseline: + if (image_hash and + (self._test_args.new_baseline or self._test_args.reset_results)): image_hash = "" start = time.time() crash, timeout, actual_checksum, output, error = \ diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/printing_unittest.py b/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/printing_unittest.py index dba1194..3804210 100644 --- a/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/printing_unittest.py +++ b/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/printing_unittest.py @@ -239,6 +239,8 @@ class Testprinter(unittest.TestCase): def test_print_test_result(self): result = get_result('foo.html') printer, err, out = self.get_printer(['--print', 'nothing']) + result = get_result(os.path.join(self._port.layout_tests_dir(), + 'foo.html')) printer.print_test_result(result, expected=False, exp_str='', got_str='') self.assertTrue(err.empty()) diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/test_expectations_unittest.py b/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/test_expectations_unittest.py index d11f3e2..cf3c560 100644 --- a/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/test_expectations_unittest.py +++ b/WebKitTools/Scripts/webkitpy/layout_tests/layout_package/test_expectations_unittest.py @@ -98,19 +98,18 @@ class TestExpectationsTest(unittest.TestCase): return os.path.join(self._port.layout_tests_dir(), test_name) def get_basic_tests(self): - return [self.get_test('fast/html/article-element.html'), - self.get_test('fast/html/header-element.html'), - self.get_test('fast/html/keygen.html'), - self.get_test('fast/html/tab-order.html'), - self.get_test('fast/events/space-scroll-event.html'), - self.get_test('fast/events/tab-imagemap.html')] + return [self.get_test('text/article-element.html'), + self.get_test('image/canvas-bg.html'), + self.get_test('image/canvas-zoom.html'), + self.get_test('misc/crash.html'), + self.get_test('misc/passing.html')] def get_basic_expectations(self): return """ -BUG_TEST : fast/html/article-element.html = TEXT -BUG_TEST SKIP : fast/html/keygen.html = CRASH -BUG_TEST REBASELINE : fast/htmltab-order.html = MISSING -BUG_TEST : fast/events = IMAGE +BUG_TEST : text/article-element.html = TEXT +BUG_TEST SKIP : misc/crash.html = CRASH +BUG_TEST REBASELINE : misc/missing-expectation.html = MISSING +BUG_TEST : image = IMAGE """ def parse_exp(self, expectations, overrides=None): @@ -128,42 +127,42 @@ BUG_TEST : fast/events = IMAGE set([result])) def test_basic(self): - self.parse_exp(self.get_basic_expectations()) - self.assert_exp('fast/html/article-element.html', TEXT) - self.assert_exp('fast/events/tab-imagemap.html', IMAGE) - self.assert_exp('fast/html/header-element.html', PASS) + self.parse_exp(self.get_basic_expectations()) + self.assert_exp('text/article-element.html', TEXT) + self.assert_exp('image/canvas-zoom.html', IMAGE) + self.assert_exp('misc/passing.html', PASS) def test_duplicates(self): - self.assertRaises(SyntaxError, self.parse_exp, """ -BUG_TEST : fast/html/article-element.html = TEXT -BUG_TEST : fast/html/article-element.html = IMAGE""") - self.assertRaises(SyntaxError, self.parse_exp, - self.get_basic_expectations(), """ -BUG_TEST : fast/html/article-element.html = TEXT -BUG_TEST : fast/html/article-element.html = IMAGE""") + self.assertRaises(SyntaxError, self.parse_exp, """ +BUG_TEST : text/article-element.html = TEXT +BUG_TEST : text/article-element.html = IMAGE""") + self.assertRaises(SyntaxError, self.parse_exp, + self.get_basic_expectations(), """ +BUG_TEST : text/article-element.html = TEXT +BUG_TEST : text/article-element.html = IMAGE""") def test_overrides(self): - self.parse_exp(self.get_basic_expectations(), """ -BUG_OVERRIDE : fast/html/article-element.html = IMAGE""") - self.assert_exp('fast/html/article-element.html', IMAGE) + self.parse_exp(self.get_basic_expectations(), """ +BUG_OVERRIDE : text/article-element.html = IMAGE""") + self.assert_exp('text/article-element.html', IMAGE) def test_matches_an_expected_result(self): - def match(test, result, pixel_tests_enabled): - return self._exp.matches_an_expected_result( - self.get_test(test), result, pixel_tests_enabled) + def match(test, result, pixel_tests_enabled): + return self._exp.matches_an_expected_result( + self.get_test(test), result, pixel_tests_enabled) - self.parse_exp(self.get_basic_expectations()) - self.assertTrue(match('fast/html/article-element.html', TEXT, True)) - self.assertTrue(match('fast/html/article-element.html', TEXT, False)) - self.assertFalse(match('fast/html/article-element.html', CRASH, True)) - self.assertFalse(match('fast/html/article-element.html', CRASH, False)) + self.parse_exp(self.get_basic_expectations()) + self.assertTrue(match('text/article-element.html', TEXT, True)) + self.assertTrue(match('text/article-element.html', TEXT, False)) + self.assertFalse(match('text/article-element.html', CRASH, True)) + self.assertFalse(match('text/article-element.html', CRASH, False)) - self.assertTrue(match('fast/events/tab-imagemap.html', IMAGE, True)) - self.assertTrue(match('fast/events/tab-imagemap.html', PASS, False)) + self.assertTrue(match('image/canvas-bg.html', IMAGE, True)) + self.assertTrue(match('image/canvas-bg.html', PASS, False)) - self.assertTrue(match('fast/html/keygen.html', SKIP, False)) - self.assertTrue(match('fast/html/tab-order.html', PASS, False)) + self.assertTrue(match('misc/crash.html', SKIP, False)) + self.assertTrue(match('misc/passing.html', PASS, False)) if __name__ == '__main__': unittest.main() |