blob: a08ac33b24e944614b8909e937f6e388cc4fe8e9 [file] [log] [blame]
<!DOCTYPE html>
<!--
Copyright (c) 2014 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->
<link rel="import" href="/tracing/base/utils.html">
<script>
'use strict';
tr.b.unittest.testSuite(function() {
test('getUsingPath', function() {
var z = tr.b.getUsingPath('x.y.z', {'x': {'y': {'z': 3}}});
assert.equal(z, 3);
var w = tr.b.getUsingPath('x.w', {'x': {'y': {'z': 3}}});
assert.isUndefined(w);
});
test('testExceptionNaming', function() {
var err = new Error('asdf');
err.name = 'MyError';
var ex = tr.b.normalizeException(err);
assert.equal(ex.typeName, 'MyError');
});
});
</script>