OLD | NEW |
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 | 6 |
7 """Unittests for grit.format.policy_templates.writers.adml_writer.""" | 7 """Unittests for grit.format.policy_templates.writers.adml_writer.""" |
8 | 8 |
9 | 9 |
10 import os | 10 import os |
11 import sys | 11 import sys |
12 import unittest | 12 import unittest |
13 if __name__ == '__main__': | 13 if __name__ == '__main__': |
14 sys.path.append(os.path.join(os.path.dirname(__file__), '../../../..')) | 14 sys.path.append(os.path.join(os.path.dirname(__file__), '../../../..')) |
15 | 15 |
16 | 16 |
17 from grit.format.policy_templates.writers import adml_writer | 17 from grit.format.policy_templates.writers import adml_writer |
18 from grit.format.policy_templates.writers import xml_writer_base_unittest | 18 from grit.format.policy_templates.writers import xml_writer_base_unittest |
19 | 19 |
20 | 20 |
21 class AdmlWriterTest(xml_writer_base_unittest.XmlWriterBaseTest): | 21 class AdmlWriterUnittest(xml_writer_base_unittest.XmlWriterBaseTest): |
22 | 22 |
23 def setUp(self): | 23 def setUp(self): |
24 config = { | 24 config = { |
25 'app_name': 'test', | 25 'app_name': 'test', |
26 'build': 'test', | 26 'build': 'test', |
27 'win_supported_os': 'SUPPORTED_TESTOS', | 27 'win_supported_os': 'SUPPORTED_TESTOS', |
28 } | 28 } |
29 self.writer = adml_writer.GetWriter(config) | 29 self.writer = adml_writer.GetWriter(config) |
30 self.writer.messages = { | 30 self.writer.messages = { |
31 'win_supported_winxpsp2': { | 31 'win_supported_winxpsp2': { |
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
320 })) | 320 })) |
321 self.assertFalse(self.writer.IsPolicySupported({ | 321 self.assertFalse(self.writer.IsPolicySupported({ |
322 'supported_on': [ | 322 'supported_on': [ |
323 {'platforms': ['mac', 'linux']}, {'platforms': ['aaa']} | 323 {'platforms': ['mac', 'linux']}, {'platforms': ['aaa']} |
324 ] | 324 ] |
325 })) | 325 })) |
326 | 326 |
327 | 327 |
328 if __name__ == '__main__': | 328 if __name__ == '__main__': |
329 unittest.main() | 329 unittest.main() |
OLD | NEW |