Commit 1e75ab31 authored by Chris Nardi's avatar Chris Nardi Committed by Commit Bot

Fix running of entire WPT folders on Windows

We assumed that the file separator would be dependent on the
filesystem in the WPT manifest (so '\' on Windows), but the manifest
always uses '/', no matter what the platform. Change this code to
always split on '/'. This change also fixes a bug where WPT tests would
not run under virtual test suites on Windows.

Bug: 796424
Change-Id: Iea7466bc1208f9c8fd9938688c31029917944f77
Reviewed-on: https://chromium-review.googlesource.com/956662
Commit-Queue: Chris Nardi <cnardi@chromium.org>
Reviewed-by: default avatarRobert Ma <robertma@chromium.org>
Cr-Commit-Position: refs/heads/master@{#542166}
parent 34e92069
......@@ -2929,6 +2929,8 @@ crbug.com/757165 [ Win ] css3/blending/mix-blend-mode-with-filters.html [ Skip ]
crbug.com/757165 [ Win ] external/wpt/preload/download-resources.html [ Skip ]
crbug.com/757165 [ Win ] external/wpt/preload/preload-default-csp.sub.html [ Skip ]
crbug.com/757165 [ Win ] external/wpt/service-workers/service-worker/navigation-redirect.https.html [ Skip ]
crbug.com/757165 [ Win ] virtual/navigation-mojo-response/external/wpt/service-workers/service-worker/navigation-redirect.https.html [ Skip ]
crbug.com/757165 [ Win ] virtual/outofblink-cors/external/wpt/service-workers/service-worker/navigation-redirect.https.html [ Skip ]
crbug.com/757165 [ Win ] fast/forms/file/recover-file-input-in-unposted-form.html [ Skip ]
crbug.com/757165 [ Win ] fast/spatial-navigation/snav-aligned-not-aligned.html [ Pass Failure Timeout Crash ]
crbug.com/757165 [ Win ] fast/spatial-navigation/snav-clipped-overflowed-content.html [ Pass Failure Timeout Crash ]
......
......@@ -1732,6 +1732,10 @@ class Port(object):
def _wpt_test_urls_matching_paths(self, paths):
tests = []
# '/' is used throughout this function instead of filesystem.sep as the WPT manifest always
# uses '/' for paths (it is not OS dependent).
if self._filesystem.sep != '/':
paths = [path.replace(self._filesystem.sep, '/') for path in paths]
for test_url_path in self._wpt_manifest().all_urls():
if test_url_path[0] == '/':
......@@ -1752,8 +1756,8 @@ class Port(object):
)
# Get a list of directories for both paths, filter empty strings
full_test_url_directories = filter(None, full_test_url_path.split(self._filesystem.sep))
path_directories = filter(None, path.split(self._filesystem.sep))
full_test_url_directories = filter(None, full_test_url_path.split('/'))
path_directories = filter(None, path.split('/'))
# For all other path matches within WPT
if matches_any_js_test or path_directories == full_test_url_directories[0:len(path_directories)]:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment