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

Side by Side Diff: third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_converter_unittest.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 12 matching lines...) Expand all
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 re 28 import re
29 import unittest 29 import unittest
30 30
31 from webkitpy.common.host import Host 31 from webkitpy.common.host import Host
32 from webkitpy.common.system.outputcapture import OutputCapture 32 from webkitpy.common.system.outputcapture import OutputCapture
33 from webkitpy.common.webkit_finder import WebKitFinder 33 from webkitpy.common.blink_finder import BlinkFinder
34 from webkitpy.w3c.test_converter import _W3CTestConverter, convert_for_webkit 34 from webkitpy.w3c.test_converter import _W3CTestConverter, convert_for_webkit
35 from webkitpy.common.system.systemhost_mock import MockSystemHost 35 from webkitpy.common.system.systemhost_mock import MockSystemHost
36 from webkitpy.common.system.filesystem_mock import MockFileSystem 36 from webkitpy.common.system.filesystem_mock import MockFileSystem
37 37
38 DUMMY_FILENAME = 'dummy.html' 38 DUMMY_FILENAME = 'dummy.html'
39 DUMMY_PATH = 'dummy/testharness/path' 39 DUMMY_PATH = 'dummy/testharness/path'
40 40
41 41
42 class W3CTestConverterTest(unittest.TestCase): 42 class W3CTestConverterTest(unittest.TestCase):
43 43
44 # FIXME: When we move to using a MockHost, this method should be removed, si nce 44 # FIXME: When we move to using a MockHost, this method should be removed, si nce
45 # then we can just pass in a dummy dir path 45 # then we can just pass in a dummy dir path
46 def fake_dir_path(self, dirname): 46 def fake_dir_path(self, dirname):
47 filesystem = Host().filesystem 47 filesystem = Host().filesystem
48 webkit_root = WebKitFinder(filesystem).webkit_base() 48 webkit_root = BlinkFinder(filesystem).blink_base()
49 return filesystem.abspath(filesystem.join(webkit_root, "LayoutTests", "c ss", dirname)) 49 return filesystem.abspath(filesystem.join(webkit_root, "LayoutTests", "c ss", dirname))
50 50
51 def test_read_prefixed_property_list(self): 51 def test_read_prefixed_property_list(self):
52 """Tests that the current list of properties requiring the -webkit- pref ix load correctly.""" 52 """Tests that the current list of properties requiring the -webkit- pref ix load correctly."""
53 53
54 # FIXME: We should be passing in a MockHost here ... 54 # FIXME: We should be passing in a MockHost here ...
55 converter = _W3CTestConverter(DUMMY_PATH, DUMMY_FILENAME, None) 55 converter = _W3CTestConverter(DUMMY_PATH, DUMMY_FILENAME, None)
56 prop_list = converter.prefixed_properties 56 prop_list = converter.prefixed_properties
57 self.assertTrue(prop_list, 'No prefixed properties found') 57 self.assertTrue(prop_list, 'No prefixed properties found')
58 58
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 test_html = """<FONT></FONT>""" 301 test_html = """<FONT></FONT>"""
302 converter = _W3CTestConverter(DUMMY_PATH, DUMMY_FILENAME, None) 302 converter = _W3CTestConverter(DUMMY_PATH, DUMMY_FILENAME, None)
303 converter.feed(test_html) 303 converter.feed(test_html)
304 self.assertEqual(converter.output(), ([], """<FONT></FONT>""")) 304 self.assertEqual(converter.output(), ([], """<FONT></FONT>"""))
305 305
306 def test_for_comments(self): 306 def test_for_comments(self):
307 test_html = """<!--abc--><!-- foo -->""" 307 test_html = """<!--abc--><!-- foo -->"""
308 converter = _W3CTestConverter(DUMMY_PATH, DUMMY_FILENAME, None) 308 converter = _W3CTestConverter(DUMMY_PATH, DUMMY_FILENAME, None)
309 converter.feed(test_html) 309 converter.feed(test_html)
310 self.assertEqual(converter.output(), ([], """<!--abc--><!-- foo -->""")) 310 self.assertEqual(converter.output(), ([], """<!--abc--><!-- foo -->"""))
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698