| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright 2017 The Chromium Authors. All rights reserved. | 2 # Copyright 2017 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 import os | 6 import os |
| 7 import shutil | 7 import shutil |
| 8 import tempfile | 8 import tempfile |
| 9 import unittest | 9 import unittest |
| 10 import vulcanize_gn | 10 import vulcanize_gn |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 | 64 |
| 65 self._run_vulcanize(depfile='depfile.d', | 65 self._run_vulcanize(depfile='depfile.d', |
| 66 html_in_file='ui.html', | 66 html_in_file='ui.html', |
| 67 html_out_file='fast.html', | 67 html_out_file='fast.html', |
| 68 js_out_file='fast.js') | 68 js_out_file='fast.js') |
| 69 | 69 |
| 70 fast_html = self._read_out_file('fast.html') | 70 fast_html = self._read_out_file('fast.html') |
| 71 self.assertFalse('element.html' in fast_html) | 71 self.assertFalse('element.html' in fast_html) |
| 72 self.assertFalse('element.js' in fast_html) | 72 self.assertFalse('element.js' in fast_html) |
| 73 self.assertTrue('got here!' in fast_html) | 73 self.assertTrue('got here!' in fast_html) |
| 74 self.assertTrue('<script src="fast.js"></script>' in fast_html) |
| 74 | 75 |
| 75 fast_js = self._read_out_file('fast.js') | 76 fast_js = self._read_out_file('fast.js') |
| 76 self.assertTrue('yay' in fast_js) | 77 self.assertTrue('yay' in fast_js) |
| 77 | 78 |
| 78 depfile_d = self._read_out_file('depfile.d') | 79 depfile_d = self._read_out_file('depfile.d') |
| 79 self.assertTrue('element.html' in depfile_d) | 80 self.assertTrue('element.html' in depfile_d) |
| 80 self.assertTrue('element.js' in depfile_d) | 81 self.assertTrue('element.js' in depfile_d) |
| 81 | 82 |
| 82 | 83 |
| 83 if __name__ == '__main__': | 84 if __name__ == '__main__': |
| 84 unittest.main() | 85 unittest.main() |
| OLD | NEW |