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

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

Issue 2513423003: DevTools: Convert inspector-unit tests to use reusable test harness (Closed)
Patch Set: address CL feedback Created 4 years 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
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 773 matching lines...) Expand 10 before | Expand all | Expand 10 after
784 return extension in Port._supported_file_extensions 784 return extension in Port._supported_file_extensions
785 785
786 def is_test_file(self, filesystem, dirname, filename): 786 def is_test_file(self, filesystem, dirname, filename):
787 match = re.search(r'[/\\]imported[/\\]wpt([/\\].*)?$', dirname) 787 match = re.search(r'[/\\]imported[/\\]wpt([/\\].*)?$', dirname)
788 if match: 788 if match:
789 if match.group(1): 789 if match.group(1):
790 path_in_wpt = match.group(1)[1:].replace('\\', '/') + '/' + file name 790 path_in_wpt = match.group(1)[1:].replace('\\', '/') + '/' + file name
791 else: 791 else:
792 path_in_wpt = filename 792 path_in_wpt = filename
793 return self._manifest_items_for_path(path_in_wpt) is not None 793 return self._manifest_items_for_path(path_in_wpt) is not None
794 if 'inspector-unit' in dirname:
dgozman 2016/11/28 18:44:51 No idea whether this is a correct place to do a ch
795 return filesystem.splitext(filename)[1] == '.js' and 'helper.js' not in filename
794 return Port._has_supported_extension( 796 return Port._has_supported_extension(
795 filesystem, filename) and not Port.is_reference_html_file(filesystem , dirname, filename) 797 filesystem, filename) and not Port.is_reference_html_file(filesystem , dirname, filename)
796 798
797 def _convert_wpt_file_paths_to_url_paths(self, files): 799 def _convert_wpt_file_paths_to_url_paths(self, files):
798 tests = [] 800 tests = []
799 for file_path in files: 801 for file_path in files:
800 # Path separators are normalized by relative_test_filename(). 802 # Path separators are normalized by relative_test_filename().
801 match = re.search(r'imported/wpt/(.*)$', file_path) 803 match = re.search(r'imported/wpt/(.*)$', file_path)
802 if not match: 804 if not match:
803 tests.append(file_path) 805 tests.append(file_path)
(...skipping 1036 matching lines...) Expand 10 before | Expand all | Expand 10 after
1840 1842
1841 def __init__(self, base, args, reference_args=None): 1843 def __init__(self, base, args, reference_args=None):
1842 self.name = base 1844 self.name = base
1843 self.base = base 1845 self.base = base
1844 self.args = args 1846 self.args = args
1845 self.reference_args = args if reference_args is None else reference_args 1847 self.reference_args = args if reference_args is None else reference_args
1846 self.tests = set() 1848 self.tests = set()
1847 1849
1848 def __repr__(self): 1850 def __repr__(self):
1849 return "PhysicalTestSuite('%s', '%s', %s, %s)" % (self.name, self.base, self.args, self.reference_args) 1851 return "PhysicalTestSuite('%s', '%s', %s, %s)" % (self.name, self.base, self.args, self.reference_args)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698