Chromium Code Reviews| Index: grit/format/html_inline_unittest.py |
| =================================================================== |
| --- grit/format/html_inline_unittest.py (revision 102) |
| +++ grit/format/html_inline_unittest.py (working copy) |
| @@ -64,5 +64,24 @@ |
| self.failUnlessEqual(resources, source_resources) |
| tmp_dir.CleanUp() |
| + def testCompressedJavaScript(self): |
| + '''Tests that ".src=" doesn't treat as a tag.''' |
| + |
| + files = { |
| + 'index.js': ''' |
| + if(i<j)a.src="hoge.png"; |
| + ''', |
| + } |
| + |
| + source_resources = set() |
| + tmp_dir = util.TempDir(files) |
| + for filename in files: |
| + source_resources.add(tmp_dir.GetPath(filename)) |
| + |
| + resources = html_inline.GetResourceFilenames(tmp_dir.GetPath('index.js')) |
| + resources.add(tmp_dir.GetPath('index.js')) |
| + self.failUnlessEqual(resources, source_resources) |
| + tmp_dir.CleanUp() |
| + |
|
Jói
2013/01/21 15:17:01
Please add another blank line here. The rule is tw
yoshiki
2013/01/21 15:25:12
Done.
|
| if __name__ == '__main__': |
| unittest.main() |