1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/js/src/tests/js1_5/Regress/regress-464862.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,123 @@ 1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.8 + 1.9 +//----------------------------------------------------------------------------- 1.10 +var BUGNUMBER = 464862; 1.11 +var summary = 'Do not assert: ( int32_t(delta) == uint8_t(delta) )'; 1.12 +var actual = ''; 1.13 +var expect = ''; 1.14 + 1.15 +printBugNumber(BUGNUMBER); 1.16 +printStatus (summary); 1.17 + 1.18 +function ygTreeView(id) { 1.19 + this.init(id); 1.20 +} 1.21 + 1.22 +ygTreeView.prototype.init = function (id) {this.root = new ygRootNode(this);}; 1.23 + 1.24 +function ygNode() {} 1.25 + 1.26 +ygNode.prototype.nextSibling = null; 1.27 + 1.28 +ygNode.prototype.init = function (_32, _33, _34) { 1.29 + this.children = []; 1.30 + this.expanded = _34; 1.31 + if (_33) { 1.32 + this.tree = _33.tree; 1.33 + this.depth = _33.depth + 1; 1.34 + _33.appendChild(this); 1.35 + } 1.36 +}; 1.37 + 1.38 +ygNode.prototype.appendChild = function (_35) { 1.39 + if (this.hasChildren()) { 1.40 + var sib = this.children[this.children.length - 1]; 1.41 + } 1.42 + this.children[this.children.length] = _35; 1.43 +}; 1.44 + 1.45 +ygNode.prototype.getElId = function () {}; 1.46 + 1.47 +ygNode.prototype.getNodeHtml = function () {}; 1.48 + 1.49 +ygNode.prototype.getToggleElId = function () {}; 1.50 + 1.51 +ygNode.prototype.getStyle = function () { 1.52 + var loc = this.nextSibling ? "t" : "l"; 1.53 + var _39 = "n"; 1.54 + if (this.hasChildren(true)) {} 1.55 +}; 1.56 + 1.57 +ygNode.prototype.hasChildren = function () {return this.children.length > 0;}; 1.58 + 1.59 +ygNode.prototype.getHtml = function () { 1.60 + var sb = []; 1.61 + sb[sb.length] = "<div class=\"ygtvitem\" id=\"" + this.getElId() + "\">"; 1.62 + sb[sb.length] = this.getNodeHtml(); 1.63 + sb[sb.length] = this.getChildrenHtml(); 1.64 +}; 1.65 + 1.66 +ygNode.prototype.getChildrenHtml = function () { 1.67 + var sb = []; 1.68 + if (this.hasChildren(true) && this.expanded) { 1.69 + sb[sb.length] = this.renderChildren(); 1.70 + } 1.71 +}; 1.72 + 1.73 +ygNode.prototype.renderChildren = function () {return this.completeRender();}; 1.74 + 1.75 +ygNode.prototype.completeRender = function () { 1.76 + var sb = []; 1.77 + for (var i = 0; i < this.children.length; ++i) { 1.78 + sb[sb.length] = this.children[i].getHtml(); 1.79 + } 1.80 +}; 1.81 + 1.82 +ygRootNode.prototype = new ygNode; 1.83 + 1.84 +function ygRootNode(_48) { 1.85 + this.init(null, null, true); 1.86 +} 1.87 + 1.88 +ygTextNode.prototype = new ygNode; 1.89 + 1.90 +function ygTextNode(_49, _50, _51) { 1.91 + this.init(_49, _50, _51); 1.92 + this.setUpLabel(_49); 1.93 +} 1.94 + 1.95 +ygTextNode.prototype.setUpLabel = function (_52) { 1.96 + if (typeof _52 == "string") {} 1.97 + if (_52.target) {} 1.98 + this.labelElId = "ygtvlabelel" + this.index; 1.99 +}; 1.100 + 1.101 +ygTextNode.prototype.getNodeHtml = function () { 1.102 + var sb = new Array; 1.103 + sb[sb.length] = "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">"; 1.104 + sb[sb.length] = "<tr>"; 1.105 + for (i = 0; i < this.depth; ++i) {} 1.106 + sb[sb.length] = " id=\"" + this.getToggleElId() + "\""; 1.107 + sb[sb.length] = " class=\"" + this.getStyle() + "\""; 1.108 + if (this.hasChildren(true)) {} 1.109 + sb[sb.length] = " id=\"" + this.labelElId + "\""; 1.110 +}; 1.111 + 1.112 +function buildUserTree() { 1.113 + userTree = new ygTreeView("userTree"); 1.114 + addMenuNode(userTree, "N", "navheader"); 1.115 + addMenuNode(userTree, "R", "navheader"); 1.116 + addMenuNode(userTree, "S", "navheader"); 1.117 +} 1.118 + 1.119 +function addMenuNode(tree, label, styleClass) { 1.120 + new ygTextNode({}, tree.root, false); 1.121 +} 1.122 + 1.123 +buildUserTree(); 1.124 +userTree.root.getHtml(); 1.125 + 1.126 +reportCompare(expect, actual, summary);