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/base/base.html"> 9 <script> 10 'use strict'; 11 12 tr.exportTo('tr.ui.analysis', function() { 13 function StubAnalysisTable() { 14 this.ownerDocument_ = document; 15 this.nodes_ = []; 16 } 17 18 StubAnalysisTable.prototype = { 19 __proto__: Object.protoype, 20 21 get ownerDocument() { 22 return this.ownerDocument_; 23 }, 24 25 appendChild: function(node) { 26 if (node.tagName == 'TFOOT' || node.tagName == 'THEAD' || 27 node.tagName == 'TBODY') { 28 node.__proto__ = StubAnalysisTable.prototype; 29 node.nodes_ = []; 30 node.ownerDocument_ = document; 31 } 32 this.nodes_.push(node); 33 }, 34 35 get lastNode() { 36 return this.nodes_.pop(); 37 }, 38 39 get nodeCount() { 40 return this.nodes_.length; 41 } 42 }; 43 44 return { 45 StubAnalysisTable: StubAnalysisTable 46 }; 47 }); 48 </script> 49