Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / third_party / trace-viewer / trace_viewer / tracing / analysis / analysis_sub_view_test.html
1 <!DOCTYPE html>
2 <!--
3 Copyright (c) 2013 The Chromium Authors. All rights reserved.
4 Use of this source code is governed by a BSD-style license that can be
5 found in the LICENSE file.
6 -->
7
8 <link rel="import" href="/tracing/analysis/analysis_sub_view.html">
9 <link rel="import" href="/tracing/selection.html">
10
11 <script>
12 'use strict';
13
14 tvcm.unittest.testSuite(function() {
15   test('subViewThrowsNotImplementedErrors', function() {
16     var subView = new TracingAnalysisSubView();
17
18     var errorCaught = false;
19     try {
20       subView.selection = new tracing.Selection();
21     } catch(error) {
22       if (error.message === 'Not implemented!')
23         errorCaught = true;
24     }
25     assertTrue(errorCaught);
26
27     errorCaught = false;
28     try {
29       var viewSelection = subView.selection;
30     } catch(error) {
31       if (error.message === 'Not implemented!')
32         errorCaught = true;
33     }
34     assertTrue(errorCaught);
35
36     subView.tabLabel = 'Tab Label';
37     assertEquals('Tab Label', subView.getAttribute('tab-label'));
38     assertEquals('Tab Label', subView.tabLabel);
39
40     subView.tabLabel = 'New Label';
41     assertEquals('New Label', subView.getAttribute('tab-label'));
42     assertEquals('New Label', subView.tabLabel);
43   });
44 });
45 </script>