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

Side by Side Diff: third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_converter.py

Issue 2496063002: Rename WebKitFinder -> BlinkFinder. (Closed)
Patch Set: Created 4 years, 1 month 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) 2013 Adobe Systems Incorporated. All rights reserved. 1 # Copyright (C) 2013 Adobe Systems Incorporated. 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 4 # modification, are permitted provided that the following conditions
5 # are met: 5 # are met:
6 # 6 #
7 # 1. Redistributions of source code must retain the above 7 # 1. Redistributions of source code must retain the above
8 # copyright notice, this list of conditions and the following 8 # copyright notice, this list of conditions and the following
9 # disclaimer. 9 # disclaimer.
10 # 2. Redistributions in binary form must reproduce the above 10 # 2. Redistributions in binary form must reproduce the above
(...skipping 11 matching lines...) Expand all
22 # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22 # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR 23 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
24 # TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF 24 # TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
25 # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 # SUCH DAMAGE. 26 # SUCH DAMAGE.
27 27
28 import logging 28 import logging
29 import re 29 import re
30 30
31 from webkitpy.common.host import Host 31 from webkitpy.common.host import Host
32 from webkitpy.common.webkit_finder import WebKitFinder 32 from webkitpy.common.blink_finder import BlinkFinder
33 from HTMLParser import HTMLParser 33 from HTMLParser import HTMLParser
34 34
35 35
36 _log = logging.getLogger(__name__) 36 _log = logging.getLogger(__name__)
37 37
38 38
39 def convert_for_webkit(new_path, filename, reference_support_info, host=Host()): 39 def convert_for_webkit(new_path, filename, reference_support_info, host=Host()):
40 """Converts a file's contents so the Blink layout test runner can run it. 40 """Converts a file's contents so the Blink layout test runner can run it.
41 41
42 Args: 42 Args:
(...skipping 27 matching lines...) Expand all
70 70
71 After the feed() method is called, the converted document will be stored 71 After the feed() method is called, the converted document will be stored
72 in converted_data, and can be retrieved with the output() method. 72 in converted_data, and can be retrieved with the output() method.
73 """ 73 """
74 74
75 def __init__(self, new_path, filename, reference_support_info, host=Host()): 75 def __init__(self, new_path, filename, reference_support_info, host=Host()):
76 HTMLParser.__init__(self) 76 HTMLParser.__init__(self)
77 77
78 self._host = host 78 self._host = host
79 self._filesystem = self._host.filesystem 79 self._filesystem = self._host.filesystem
80 self._webkit_root = WebKitFinder(self._filesystem).webkit_base() 80 self._webkit_root = BlinkFinder(self._filesystem).blink_base()
81 81
82 self.converted_data = [] 82 self.converted_data = []
83 self.converted_properties = [] 83 self.converted_properties = []
84 self.in_style_tag = False 84 self.in_style_tag = False
85 self.style_data = [] 85 self.style_data = []
86 self.filename = filename 86 self.filename = filename
87 self.reference_support_info = reference_support_info 87 self.reference_support_info = reference_support_info
88 resources_path = self.path_from_webkit_root('LayoutTests', 'resources') 88 resources_path = self.path_from_webkit_root('LayoutTests', 'resources')
89 resources_relpath = self._filesystem.relpath(resources_path, new_path) 89 resources_relpath = self._filesystem.relpath(resources_path, new_path)
90 self.resources_relpath = resources_relpath 90 self.resources_relpath = resources_relpath
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 self.converted_data.extend(['&#', name, ';']) 223 self.converted_data.extend(['&#', name, ';'])
224 224
225 def handle_comment(self, data): 225 def handle_comment(self, data):
226 self.converted_data.extend(['<!--', data, '-->']) 226 self.converted_data.extend(['<!--', data, '-->'])
227 227
228 def handle_decl(self, decl): 228 def handle_decl(self, decl):
229 self.converted_data.extend(['<!', decl, '>']) 229 self.converted_data.extend(['<!', decl, '>'])
230 230
231 def handle_pi(self, data): 231 def handle_pi(self, data):
232 self.converted_data.extend(['<?', data, '>']) 232 self.converted_data.extend(['<?', data, '>'])
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698