1<!DOCTYPE html>
2<!--
3Copyright (c) 2015 The Chromium Authors. All rights reserved.
4Use of this source code is governed by a BSD-style license that can be
5found in the LICENSE file.
6-->
7
8<link rel="import" href="/tracing/core/test_utils.html">
9<link rel="import" href="/tracing/ui/tracks/chart_point.html">
10
11<script>
12'use strict';
13
14tr.b.unittest.testSuite(function() {
15  var ChartPoint = tr.ui.tracks.ChartPoint;
16
17  test('checkFields_withoutYBase', function() {
18    var event = {};
19    var point = new ChartPoint(event, 42, -7);
20
21    assert.equal(point.modelItem, event);
22    assert.equal(point.x, 42);
23    assert.equal(point.y, -7);
24    assert.isUndefined(point.yBase);
25  });
26
27  test('checkFields_withYBase', function() {
28    var event = {};
29    var point = new ChartPoint(event, 111, 222, 333);
30
31    assert.equal(point.modelItem, event);
32    assert.equal(point.x, 111);
33    assert.equal(point.y, 222);
34    assert.equal(point.yBase, 333);
35  });
36});
37</script>
38