OLD | NEW |
---|---|
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright 2014 The Chromium Authors. All rights reserved. | 2 # Copyright 2014 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 """Test resources processing, i.e. <if> and <include> tag handling.""" | 6 """Test resources processing, i.e. <if> and <include> tag handling.""" |
7 | 7 |
8 import unittest | 8 import unittest |
9 from processor import FileCache, Processor, LineNumber | 9 from processor import FileCache, Processor, LineNumber |
10 | 10 |
(...skipping 23 matching lines...) Expand all Loading... | |
34 * @fileoverview Coolest app ever. | 34 * @fileoverview Coolest app ever. |
35 * @author Douglas Crockford (douglas@crockford.com) | 35 * @author Douglas Crockford (douglas@crockford.com) |
36 */ | 36 */ |
37 <include src="/global.js"> | 37 <include src="/global.js"> |
38 debug(global); | 38 debug(global); |
39 // Here continues checked.js, a swell file. | 39 // Here continues checked.js, a swell file. |
40 """.strip() | 40 """.strip() |
41 | 41 |
42 self._processor = Processor("/checked.js") | 42 self._processor = Processor("/checked.js") |
43 | 43 |
44 def testInline(self): | 44 def testInline(self): |
Dan Beam
2014/08/13 22:06:55
testName is 10x more popular than test_name in chr
| |
45 self.assertMultiLineEqual(""" | 45 self.assertMultiLineEqual(""" |
46 // Copyright 2028 Future Chromium Author dudes. | 46 // Copyright 2028 Future Chromium Author dudes. |
47 /** | 47 /** |
48 * @fileoverview Coolest app ever. | 48 * @fileoverview Coolest app ever. |
49 * @author Douglas Crockford (douglas@crockford.com) | 49 * @author Douglas Crockford (douglas@crockford.com) |
50 */ | 50 */ |
51 // Copyright 2014 Old Chromium Author dudes. | 51 // Copyright 2014 Old Chromium Author dudes. |
52 // Copyright 2002 Older Chromium Author dudes. | 52 // Copyright 2002 Older Chromium Author dudes. |
53 function debug(msg) { if (window.DEBUG) alert(msg); } | 53 function debug(msg) { if (window.DEBUG) alert(msg); } |
54 var global = 'type checking!'; | 54 var global = 'type checking!'; |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
105 alert("Oh wow!"); | 105 alert("Oh wow!"); |
106 return "XX"; | 106 return "XX"; |
107 | 107 |
108 return "XXI"; | 108 return "XXI"; |
109 } | 109 } |
110 """.strip(), self.processor_.contents) | 110 """.strip(), self.processor_.contents) |
111 | 111 |
112 | 112 |
113 if __name__ == '__main__': | 113 if __name__ == '__main__': |
114 unittest.main() | 114 unittest.main() |
115 | |
OLD | NEW |