Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(142)

Side by Side Diff: third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/base.py

Issue 2742623002: DevTools: improve test infrastructure w/ devtools driving the test (Closed)
Patch Set: fixup Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/devtools/scripts/extract_module/extract_module.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 707 matching lines...) Expand 10 before | Expand all | Expand 10 after
718 return extension in Port.supported_file_extensions 718 return extension in Port.supported_file_extensions
719 719
720 def is_test_file(self, filesystem, dirname, filename): 720 def is_test_file(self, filesystem, dirname, filename):
721 match = re.search(r'[/\\]external[/\\]wpt([/\\].*)?$', dirname) 721 match = re.search(r'[/\\]external[/\\]wpt([/\\].*)?$', dirname)
722 if match: 722 if match:
723 if match.group(1): 723 if match.group(1):
724 path_in_wpt = match.group(1)[1:].replace('\\', '/') + '/' + file name 724 path_in_wpt = match.group(1)[1:].replace('\\', '/') + '/' + file name
725 else: 725 else:
726 path_in_wpt = filename 726 path_in_wpt = filename
727 return self._wpt_manifest().is_test_file(path_in_wpt) 727 return self._wpt_manifest().is_test_file(path_in_wpt)
728 if 'inspector-unit' in dirname: 728 if 'inspector-unit' in dirname or 'devtools-js' in dirname:
729 return filesystem.splitext(filename)[1] == '.js' 729 return filesystem.splitext(filename)[1] == '.js'
730 return Port._has_supported_extension( 730 return Port._has_supported_extension(
731 filesystem, filename) and not Port.is_reference_html_file(filesystem , dirname, filename) 731 filesystem, filename) and not Port.is_reference_html_file(filesystem , dirname, filename)
732 732
733 def _convert_wpt_file_paths_to_url_paths(self, files): 733 def _convert_wpt_file_paths_to_url_paths(self, files):
734 tests = [] 734 tests = []
735 for file_path in files: 735 for file_path in files:
736 # Path separators are normalized by relative_test_filename(). 736 # Path separators are normalized by relative_test_filename().
737 match = re.search(r'external/wpt/(.*)$', file_path) 737 match = re.search(r'external/wpt/(.*)$', file_path)
738 if not match: 738 if not match:
(...skipping 896 matching lines...) Expand 10 before | Expand all | Expand 10 after
1635 1635
1636 def __init__(self, base, args, reference_args=None): 1636 def __init__(self, base, args, reference_args=None):
1637 self.name = base 1637 self.name = base
1638 self.base = base 1638 self.base = base
1639 self.args = args 1639 self.args = args
1640 self.reference_args = args if reference_args is None else reference_args 1640 self.reference_args = args if reference_args is None else reference_args
1641 self.tests = set() 1641 self.tests = set()
1642 1642
1643 def __repr__(self): 1643 def __repr__(self):
1644 return "PhysicalTestSuite('%s', '%s', %s, %s)" % (self.name, self.base, self.args, self.reference_args) 1644 return "PhysicalTestSuite('%s', '%s', %s, %s)" % (self.name, self.base, self.args, self.reference_args)
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/devtools/scripts/extract_module/extract_module.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698