1 <!DOCTYPE html> 2 <!-- 3 Copyright (c) 2014 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 <link rel="import" href="/tracing/base/base.html"> 8 9 <script src="/chai/chai.js"></script> 10 <script> 11 'use strict'; 12 /** 13 * Alias chai assert to the global assert. 14 */ 15 if (tr.isNode) { 16 // In node, chai.js knows to act as a node module, whereas our HTML 17 // imports code expects chai to end up in the global scope. So, in Node, 18 // copy the chai exports into global. 19 var chaiAbsPath = HTMLImportsLoader.hrefToAbsolutePath( 20 '/chai/chai.js'); 21 var chaiModule = require(chaiAbsPath); 22 for (var exportName in chaiModule) 23 global[exportName] = chaiModule[exportName]; 24 } else { 25 /** 26 * Catapult presubmit wanted me to put a jsdoc here. So nduca did. 27 */ 28 global.assert = chai.assert; 29 } 30 </script> 31 32 <link rel="import" href="/tracing/base/unittest/suite_loader.html"> 33 <link rel="import" href="/tracing/base/unittest/test_case.html"> 34 <link rel="import" href="/tracing/base/unittest/test_suite.html"> 35 <link rel="import" href="/tracing/base/unittest/test_runner.html"> 36 <script> 37 'use strict'; 38 tr.exportTo('tr.b.unittest', function() { 39 return { 40 }; 41 }); 42 </script> 43