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

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

Issue 2735443002: Refactor ServiceWorker tests for inclusion in WPT (Closed)
Patch Set: Upstream service worker nav. preload tests to WPT 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
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 1133 matching lines...) Expand 10 before | Expand all | Expand 10 after
1144 """ 1144 """
1145 assert not self._websocket_server, 'Already running a websocket server.' 1145 assert not self._websocket_server, 'Already running a websocket server.'
1146 1146
1147 server = pywebsocket.PyWebSocket(self, self.results_directory()) 1147 server = pywebsocket.PyWebSocket(self, self.results_directory())
1148 server.start() 1148 server.start()
1149 self._websocket_server = server 1149 self._websocket_server = server
1150 1150
1151 @staticmethod 1151 @staticmethod
1152 def is_wptserve_test(test): 1152 def is_wptserve_test(test):
1153 """Whether wptserve should be used for a given test if enabled.""" 1153 """Whether wptserve should be used for a given test if enabled."""
1154 return test.startswith('external/wpt/') 1154 return re.match(r'(virtual/[^/]+/)?external/wpt/', test)
1155 1155
1156 def should_use_wptserve(self, test): 1156 def should_use_wptserve(self, test):
1157 return self.is_wptserve_test(test) 1157 return self.is_wptserve_test(test)
1158 1158
1159 def start_wptserve(self): 1159 def start_wptserve(self):
1160 """Starts a WPT web server. 1160 """Starts a WPT web server.
1161 1161
1162 Raises an error if it can't start or is already running. 1162 Raises an error if it can't start or is already running.
1163 """ 1163 """
1164 assert not self._wpt_server, 'Already running a WPT server.' 1164 assert not self._wpt_server, 'Already running a WPT server.'
(...skipping 470 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

Powered by Google App Engine
This is Rietveld 408576698