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

Side by Side Diff: chrome/browser/resources/vulcanize_gn_test.py

Issue 2915393002: vulcanize_gn.py: Stop writing twice to the declared GN output file. (Closed)
Patch Set: Nits. Created 3 years, 6 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 | « chrome/browser/resources/vulcanize_gn.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 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
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()
OLDNEW
« no previous file with comments | « chrome/browser/resources/vulcanize_gn.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698