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

Side by Side Diff: grit/format/html_inline_unittest.py

Issue 1374383003: Ignore Polymer bound src="[[attr]]" from grit processing. (Closed) Base URL: https://chromium.googlesource.com/external/grit-i18n.git@master
Patch Set: test fixes Created 5 years, 2 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
« no previous file with comments | « grit/format/html_inline.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 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 '''Unit tests for grit.format.html_inline''' 6 '''Unit tests for grit.format.html_inline'''
7 7
8 8
9 import os 9 import os
10 import re 10 import re
(...skipping 19 matching lines...) Expand all
30 <html> 30 <html>
31 <head> 31 <head>
32 <link rel="stylesheet" href="test.css"> 32 <link rel="stylesheet" href="test.css">
33 <link rel="stylesheet" 33 <link rel="stylesheet"
34 href="really-long-long-long-long-long-test.css"> 34 href="really-long-long-long-long-long-test.css">
35 </head> 35 </head>
36 <body> 36 <body>
37 <include src="test.html"> 37 <include src="test.html">
38 <include 38 <include
39 src="really-long-long-long-long-long-test-file-omg-so-long.html"> 39 src="really-long-long-long-long-long-test-file-omg-so-long.html">
40 <iron-icon src="[[icon]]"></iron-icon><!-- Should be ignored. -->
41 <iron-icon src="{{src}}"></iron-icon><!-- Also ignored. -->
40 </body> 42 </body>
41 </html> 43 </html>
42 ''', 44 ''',
43 45
44 'test.html': ''' 46 'test.html': '''
45 <include src="test2.html"> 47 <include src="test2.html">
46 ''', 48 ''',
47 49
48 'really-long-long-long-long-long-test-file-omg-so-long.html': ''' 50 'really-long-long-long-long-long-test-file-omg-so-long.html': '''
49 <!-- This really long named resource should be included. --> 51 <!-- This really long named resource should be included. -->
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 tmp_dir.GetPath('index.html'), 343 tmp_dir.GetPath('index.html'),
342 None) 344 None)
343 resources = result.inlined_files 345 resources = result.inlined_files
344 resources.add(tmp_dir.GetPath('index.html')) 346 resources.add(tmp_dir.GetPath('index.html'))
345 self.failUnlessEqual(resources, source_resources) 347 self.failUnlessEqual(resources, source_resources)
346 self.failUnlessEqual(expected_inlined, 348 self.failUnlessEqual(expected_inlined,
347 util.FixLineEnd(result.inlined_data, '\n')) 349 util.FixLineEnd(result.inlined_data, '\n'))
348 350
349 if __name__ == '__main__': 351 if __name__ == '__main__':
350 unittest.main() 352 unittest.main()
OLDNEW
« no previous file with comments | « grit/format/html_inline.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698