OLD | NEW |
(Empty) | |
| 1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
| 2 /* ***** BEGIN LICENSE BLOCK ***** |
| 3 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 |
| 4 * |
| 5 * The contents of this file are subject to the Mozilla Public License Version |
| 6 * 1.1 (the "License"); you may not use this file except in compliance with |
| 7 * the License. You may obtain a copy of the License at |
| 8 * http://www.mozilla.org/MPL/ |
| 9 * |
| 10 * Software distributed under the License is distributed on an "AS IS" basis, |
| 11 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License |
| 12 * for the specific language governing rights and limitations under the |
| 13 * License. |
| 14 * |
| 15 * The Original Code is JavaScript Engine testing utilities. |
| 16 * |
| 17 * The Initial Developer of the Original Code is |
| 18 * Mozilla Foundation. |
| 19 * Portions created by the Initial Developer are Copyright (C) 2008 |
| 20 * the Initial Developer. All Rights Reserved. |
| 21 * |
| 22 * Contributor(s): Jesse Ruderman |
| 23 * |
| 24 * Alternatively, the contents of this file may be used under the terms of |
| 25 * either the GNU General Public License Version 2 or later (the "GPL"), or |
| 26 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), |
| 27 * in which case the provisions of the GPL or the LGPL are applicable instead |
| 28 * of those above. If you wish to allow use of your version of this file only |
| 29 * under the terms of either the GPL or the LGPL, and not to allow others to |
| 30 * use your version of this file under the terms of the MPL, indicate your |
| 31 * decision by deleting the provisions above and replace them with the notice |
| 32 * and other provisions required by the GPL or the LGPL. If you do not delete |
| 33 * the provisions above, a recipient may use your version of this file under |
| 34 * the terms of any one of the MPL, the GPL or the LGPL. |
| 35 * |
| 36 * ***** END LICENSE BLOCK ***** */ |
| 37 |
| 38 var gTestfile = 'regress-464862.js'; |
| 39 //----------------------------------------------------------------------------- |
| 40 var BUGNUMBER = 464862; |
| 41 var summary = 'Do not assert: ( int32_t(delta) == uint8_t(delta) )'; |
| 42 var actual = ''; |
| 43 var expect = ''; |
| 44 |
| 45 printBugNumber(BUGNUMBER); |
| 46 printStatus (summary); |
| 47 |
| 48 function ygTreeView(id) { |
| 49 this.init(id); |
| 50 } |
| 51 |
| 52 ygTreeView.prototype.init = function (id) {this.root = new ygRootNode(this);}; |
| 53 |
| 54 function ygNode() {} |
| 55 |
| 56 ygNode.prototype.nextSibling = null; |
| 57 |
| 58 ygNode.prototype.init = function (_32, _33, _34) { |
| 59 this.children = []; |
| 60 this.expanded = _34; |
| 61 if (_33) { |
| 62 this.tree = _33.tree; |
| 63 this.depth = _33.depth + 1; |
| 64 _33.appendChild(this); |
| 65 } |
| 66 }; |
| 67 |
| 68 ygNode.prototype.appendChild = function (_35) { |
| 69 if (this.hasChildren()) { |
| 70 var sib = this.children[this.children.length - 1]; |
| 71 } |
| 72 this.children[this.children.length] = _35; |
| 73 }; |
| 74 |
| 75 ygNode.prototype.getElId = function () {}; |
| 76 |
| 77 ygNode.prototype.getNodeHtml = function () {}; |
| 78 |
| 79 ygNode.prototype.getToggleElId = function () {}; |
| 80 |
| 81 ygNode.prototype.getStyle = function () { |
| 82 var loc = this.nextSibling ? "t" : "l"; |
| 83 var _39 = "n"; |
| 84 if (this.hasChildren(true)) {} |
| 85 }; |
| 86 |
| 87 ygNode.prototype.hasChildren = function () {return this.children.length > 0;}; |
| 88 |
| 89 ygNode.prototype.getHtml = function () { |
| 90 var sb = []; |
| 91 sb[sb.length] = "<div class=\"ygtvitem\" id=\"" + this.getElId() + "\">"; |
| 92 sb[sb.length] = this.getNodeHtml(); |
| 93 sb[sb.length] = this.getChildrenHtml(); |
| 94 }; |
| 95 |
| 96 ygNode.prototype.getChildrenHtml = function () { |
| 97 var sb = []; |
| 98 if (this.hasChildren(true) && this.expanded) { |
| 99 sb[sb.length] = this.renderChildren(); |
| 100 } |
| 101 }; |
| 102 |
| 103 ygNode.prototype.renderChildren = function () {return this.completeRender();}; |
| 104 |
| 105 ygNode.prototype.completeRender = function () { |
| 106 var sb = []; |
| 107 for (var i = 0; i < this.children.length; ++i) { |
| 108 sb[sb.length] = this.children[i].getHtml(); |
| 109 } |
| 110 }; |
| 111 |
| 112 ygRootNode.prototype = new ygNode; |
| 113 |
| 114 function ygRootNode(_48) { |
| 115 this.init(null, null, true); |
| 116 } |
| 117 |
| 118 ygTextNode.prototype = new ygNode; |
| 119 |
| 120 function ygTextNode(_49, _50, _51) { |
| 121 this.init(_49, _50, _51); |
| 122 this.setUpLabel(_49); |
| 123 } |
| 124 |
| 125 ygTextNode.prototype.setUpLabel = function (_52) { |
| 126 if (typeof _52 == "string") {} |
| 127 if (_52.target) {} |
| 128 this.labelElId = "ygtvlabelel" + this.index; |
| 129 }; |
| 130 |
| 131 ygTextNode.prototype.getNodeHtml = function () { |
| 132 var sb = new Array; |
| 133 sb[sb.length] = "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">"; |
| 134 sb[sb.length] = "<tr>"; |
| 135 for (i = 0; i < this.depth; ++i) {} |
| 136 sb[sb.length] = " id=\"" + this.getToggleElId() + "\""; |
| 137 sb[sb.length] = " class=\"" + this.getStyle() + "\""; |
| 138 if (this.hasChildren(true)) {} |
| 139 sb[sb.length] = " id=\"" + this.labelElId + "\""; |
| 140 }; |
| 141 |
| 142 function buildUserTree() { |
| 143 userTree = new ygTreeView("userTree"); |
| 144 addMenuNode(userTree, "N", "navheader"); |
| 145 addMenuNode(userTree, "R", "navheader"); |
| 146 addMenuNode(userTree, "S", "navheader"); |
| 147 } |
| 148 |
| 149 function addMenuNode(tree, label, styleClass) { |
| 150 new ygTextNode({}, tree.root, false); |
| 151 } |
| 152 |
| 153 buildUserTree(); |
| 154 userTree.root.getHtml(); |
| 155 |
| 156 reportCompare(expect, actual, summary); |
OLD | NEW |