Skip to content
Permalink
Browse files
2011-01-28 Dirk Pranke <dpranke@chromium.org>
         Reviewed by Mihai Parparita.

         test-webkitpy: fix webkitpy.layout_tests.port.mac_unittest.MacTest.test_skipped_file_paths

         This patch re-enables this test and changes it to
         handle all of the mac platform versions, not just the one
         it is running on.

         https://bugs.webkit.org/show_bug.cgi?id=53356

         * Scripts/webkitpy/layout_tests/port/mac_unittest.py:

Canonical link: https://commits.webkit.org/67193@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@77039 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
dpranke committed Jan 29, 2011
1 parent 9b34c2b commit bf3a8144030450d40041bf2ac7efd3ce4ea67b63
Showing 2 changed files with 27 additions and 8 deletions.
@@ -1,3 +1,17 @@
2011-01-28 Dirk Pranke <dpranke@chromium.org>

Reviewed by Mihai Parparita.

test-webkitpy: fix webkitpy.layout_tests.port.mac_unittest.MacTest.test_skipped_file_paths

This patch re-enables this test and changes it to
handle all of the mac platform versions, not just the one
it is running on.

https://bugs.webkit.org/show_bug.cgi?id=53356

* Scripts/webkitpy/layout_tests/port/mac_unittest.py:

2011-01-28 Dirk Pranke <dpranke@chromium.org>

Unreviewed, build fix.
@@ -35,26 +35,31 @@


class MacTest(port_testcase.PortTestCase):
def make_port(self, options=port_testcase.mock_options):
def make_port(self, port_name=None, options=port_testcase.mock_options):
if sys.platform != 'darwin':
return None
port_obj = mac.MacPort(options=options)
port_obj = mac.MacPort(port_name=port_name, options=options)
port_obj._options.results_directory = port_obj.results_directory()
port_obj._options.configuration = 'Release'
return port_obj

# FIXME: This test does not appear to be correct. It seems to receive
# different answers on different platforms. We should consider re-enabling
# it once we've worked out how to make it correct.
def disabled_test_skipped_file_paths(self):
port = self.make_port()
def assert_skipped_files_for_version(self, port_name, expected_paths):
port = self.make_port(port_name)
if not port:
return
skipped_paths = port._skipped_file_paths()
# FIXME: _skipped_file_paths should return WebKit-relative paths.
# So to make it unit testable, we strip the WebKit directory from the path.
relative_paths = [path[len(port.path_from_webkit_base()):] for path in skipped_paths]
self.assertEqual(relative_paths, ['LayoutTests/platform/mac-leopard/Skipped', 'LayoutTests/platform/mac/Skipped'])
self.assertEqual(relative_paths, expected_paths)

def test_skipped_file_paths(self):
self.assert_skipped_files_for_version('mac',
['/LayoutTests/platform/mac/Skipped'])
self.assert_skipped_files_for_version('mac-snowleopard',
['/LayoutTests/platform/mac-snowleopard/Skipped', '/LayoutTests/platform/mac/Skipped'])
self.assert_skipped_files_for_version('mac-leopard',
['/LayoutTests/platform/mac-leopard/Skipped', '/LayoutTests/platform/mac/Skipped'])

example_skipped_file = u"""
# <rdar://problem/5647952> fast/events/mouseout-on-window.html needs mac DRT to issue mouse out events

0 comments on commit bf3a814

Please sign in to comment.