| <!DOCTYPE html> |
| <!-- |
| Copyright (c) 2015 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/core/test_utils.html"> |
| <link rel="import" href="/tracing/extras/chrome/slice_title_fixer.html"> |
| |
| <script> |
| 'use strict'; |
| |
| tr.b.unittest.testSuite(function() { |
| const stfFromEvent = tr.e.chrome.SliceTitleFixer.fromEvent; |
| |
| test('sliceTitleFixer', function() { |
| assert.strictEqual(stfFromEvent({ |
| title: 'SomeDummy:event' |
| }), 'SomeDummy:event'); |
| |
| assert.strictEqual(stfFromEvent({ |
| title: 'EventWith:sourceFunction', |
| args: {'src_func': 'theSource'} |
| }), 'EventWith:sourceFunction <- theSource'); |
| }); |
| }); |
| </script> |