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
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/
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
15 * The Original Code is JavaScript Engine testing utilities.
17 * The Initial Developer of the Original Code is
19 * Portions created by the Initial Developer are Copyright (C) 2008
20 * the Initial Developer. All Rights Reserved.
22 * Contributor(s): Jesse Ruderman
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.
36 * ***** END LICENSE BLOCK ***** */
38 //-----------------------------------------------------------------------------
39 var BUGNUMBER = 464862;
40 var summary = 'Do not assert: ( int32_t(delta) == uint8_t(delta) )';
44 printBugNumber(BUGNUMBER);
45 printStatus (summary);
47 function ygTreeView(id) {
51 ygTreeView.prototype.init = function (id) {this.root = new ygRootNode(this);};
55 ygNode.prototype.nextSibling = null;
57 ygNode.prototype.init = function (_32, _33, _34) {
62 this.depth = _33.depth + 1;
63 _33.appendChild(this);
67 ygNode.prototype.appendChild = function (_35) {
68 if (this.hasChildren()) {
69 var sib = this.children[this.children.length - 1];
71 this.children[this.children.length] = _35;
74 ygNode.prototype.getElId = function () {};
76 ygNode.prototype.getNodeHtml = function () {};
78 ygNode.prototype.getToggleElId = function () {};
80 ygNode.prototype.getStyle = function () {
81 var loc = this.nextSibling ? "t" : "l";
83 if (this.hasChildren(true)) {}
86 ygNode.prototype.hasChildren = function () {return this.children.length > 0;};
88 ygNode.prototype.getHtml = function () {
90 sb[sb.length] = "<div class=\"ygtvitem\" id=\"" + this.getElId() + "\">";
91 sb[sb.length] = this.getNodeHtml();
92 sb[sb.length] = this.getChildrenHtml();
95 ygNode.prototype.getChildrenHtml = function () {
97 if (this.hasChildren(true) && this.expanded) {
98 sb[sb.length] = this.renderChildren();
102 ygNode.prototype.renderChildren = function () {return this.completeRender();};
104 ygNode.prototype.completeRender = function () {
106 for (var i = 0; i < this.children.length; ++i) {
107 sb[sb.length] = this.children[i].getHtml();
111 ygRootNode.prototype = new ygNode;
113 function ygRootNode(_48) {
114 this.init(null, null, true);
117 ygTextNode.prototype = new ygNode;
119 function ygTextNode(_49, _50, _51) {
120 this.init(_49, _50, _51);
121 this.setUpLabel(_49);
124 ygTextNode.prototype.setUpLabel = function (_52) {
125 if (typeof _52 == "string") {}
127 this.labelElId = "ygtvlabelel" + this.index;
130 ygTextNode.prototype.getNodeHtml = function () {
132 sb[sb.length] = "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">";
133 sb[sb.length] = "<tr>";
134 for (i = 0; i < this.depth; ++i) {}
135 sb[sb.length] = " id=\"" + this.getToggleElId() + "\"";
136 sb[sb.length] = " class=\"" + this.getStyle() + "\"";
137 if (this.hasChildren(true)) {}
138 sb[sb.length] = " id=\"" + this.labelElId + "\"";
141 function buildUserTree() {
142 userTree = new ygTreeView("userTree");
143 addMenuNode(userTree, "N", "navheader");
144 addMenuNode(userTree, "R", "navheader");
145 addMenuNode(userTree, "S", "navheader");
148 function addMenuNode(tree, label, styleClass) {
149 new ygTextNode({}, tree.root, false);
153 userTree.root.getHtml();
155 reportCompare(expect, actual, summary);