e9f653e386e83d88a77524c19aaa914ff619cc4c
[platform/framework/web/crosswalk.git] / src / third_party / trace-viewer / third_party / tvcm / tvcm / parse_deps_unittest.py
1 #!/usr/bin/env python
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
4 # found in the LICENSE file.
5 """Tests for the parse_deps module."""
6
7 import os
8 import unittest
9
10 from tvcm import parse_deps
11
12 SRC_DIR = os.path.join(os.path.dirname(__file__), '../../../src')
13
14
15 class CalcLoadSequenceTest(unittest.TestCase):
16   def test_one_toplevel_nodeps(self):
17     load_sequence = parse_deps.calc_load_sequence_internal(
18         [os.path.join('base', 'guid.js')], [SRC_DIR])
19     name_sequence = [x.name for x in load_sequence]
20     self.assertEquals(['base.guid'], name_sequence)
21
22
23 if __name__ == '__main__':
24   unittest.main()