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

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

Issue 2950713002: [DevTools] New harness for inspector-protocol layout tests (Closed)
Patch Set: addressed comments, 4 tests Created 3 years, 6 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/LayoutTests/inspector-protocol/stylesheet-tracking-restart.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 710 matching lines...) Expand 10 before | Expand all | Expand 10 after
721 return extension in Port.supported_file_extensions 721 return extension in Port.supported_file_extensions
722 722
723 def is_test_file(self, filesystem, dirname, filename): 723 def is_test_file(self, filesystem, dirname, filename):
724 match = re.search(r'[/\\]external[/\\]wpt([/\\].*)?$', dirname) 724 match = re.search(r'[/\\]external[/\\]wpt([/\\].*)?$', dirname)
725 if match: 725 if match:
726 if match.group(1): 726 if match.group(1):
727 path_in_wpt = match.group(1)[1:].replace('\\', '/') + '/' + file name 727 path_in_wpt = match.group(1)[1:].replace('\\', '/') + '/' + file name
728 else: 728 else:
729 path_in_wpt = filename 729 path_in_wpt = filename
730 return self._wpt_manifest().is_test_file(path_in_wpt) 730 return self._wpt_manifest().is_test_file(path_in_wpt)
731 if 'inspector-protocol' in dirname and filesystem.splitext(filename)[1] == '.js':
732 return True
731 if 'inspector-unit' in dirname or 'devtools-js' in dirname: 733 if 'inspector-unit' in dirname or 'devtools-js' in dirname:
732 return filesystem.splitext(filename)[1] == '.js' 734 return filesystem.splitext(filename)[1] == '.js'
733 return Port._has_supported_extension( 735 return Port._has_supported_extension(
734 filesystem, filename) and not Port.is_reference_html_file(filesystem , dirname, filename) 736 filesystem, filename) and not Port.is_reference_html_file(filesystem , dirname, filename)
735 737
736 def _convert_wpt_file_paths_to_url_paths(self, files): 738 def _convert_wpt_file_paths_to_url_paths(self, files):
737 tests = [] 739 tests = []
738 for file_path in files: 740 for file_path in files:
739 # Path separators are normalized by relative_test_filename(). 741 # Path separators are normalized by relative_test_filename().
740 match = re.search(r'external/wpt/(.*)$', file_path) 742 match = re.search(r'external/wpt/(.*)$', file_path)
(...skipping 909 matching lines...) Expand 10 before | Expand all | Expand 10 after
1650 1652
1651 def __init__(self, base, args, reference_args=None): 1653 def __init__(self, base, args, reference_args=None):
1652 self.name = base 1654 self.name = base
1653 self.base = base 1655 self.base = base
1654 self.args = args 1656 self.args = args
1655 self.reference_args = args if reference_args is None else reference_args 1657 self.reference_args = args if reference_args is None else reference_args
1656 self.tests = set() 1658 self.tests = set()
1657 1659
1658 def __repr__(self): 1660 def __repr__(self):
1659 return "PhysicalTestSuite('%s', '%s', %s, %s)" % (self.name, self.base, self.args, self.reference_args) 1661 return "PhysicalTestSuite('%s', '%s', %s, %s)" % (self.name, self.base, self.args, self.reference_args)
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/inspector-protocol/stylesheet-tracking-restart.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698