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

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

Issue 2523473004: In test_parser, skip files with non-ascii tags, and emit an error. (Closed)
Patch Set: l 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
« no previous file with comments | « third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_parser.py ('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) 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 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 # FIXME: use a mock filesystem 216 # FIXME: use a mock filesystem
217 parser = TestParser(os.path.join(os.path.dirname(__file__), 'test_parser .py'), MockHost()) 217 parser = TestParser(os.path.join(os.path.dirname(__file__), 'test_parser .py'), MockHost())
218 test_info = parser.analyze_test() 218 test_info = parser.analyze_test()
219 self.assertEqual(test_info, None, 'no tests should have been found in th is file') 219 self.assertEqual(test_info, None, 'no tests should have been found in th is file')
220 220
221 def test_parser_initialization_non_existent_file(self): 221 def test_parser_initialization_non_existent_file(self):
222 parser = TestParser('some/bogus/path.html', MockHost()) 222 parser = TestParser('some/bogus/path.html', MockHost())
223 self.assertEqual(parser.filename, 'some/bogus/path.html') 223 self.assertEqual(parser.filename, 'some/bogus/path.html')
224 self.assertIsNone(parser.test_doc) 224 self.assertIsNone(parser.test_doc)
225 self.assertIsNone(parser.ref_doc) 225 self.assertIsNone(parser.ref_doc)
226
227 def test_load_file_with_non_ascii_tags(self):
228 host = MockHost()
229 host.filesystem.files['/some/path.xml'] = '<d\xc3\x98dd></d\xc3\x98dd>'
230 parser = TestParser('/some/path.xml', host)
231 self.assertEqual(parser.filename, '/some/path.xml')
232 self.assertIsNone(parser.test_doc)
OLDNEW
« no previous file with comments | « third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_parser.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698