Upstream version 9.37.197.0
[platform/framework/web/crosswalk.git] / src / third_party / trace-viewer / trace_viewer / build / generate_standalone_timeline_view_unittest.py
1 # Copyright (c) 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4 import unittest
5 import tempfile
6 import shutil
7 import os
8
9 from trace_viewer.build import generate_standalone_timeline_view
10
11 class GenerateStandaloneTimelineViewTests(unittest.TestCase):
12   def test_smokeTest(self):
13     try:
14       tmpdir = tempfile.mkdtemp()
15       js = os.path.join(tmpdir, 'timeline_view.js')
16       css = os.path.join(tmpdir, 'timeline_view.css')
17       res = generate_standalone_timeline_view.main(
18           ['--js', js, '--css', css])
19       assert res == 0
20     finally:
21       shutil.rmtree(tmpdir)