Imported Upstream version 1.0.0
[platform/upstream/js.git] / js / src / tests / js1_5 / Regress / regress-464862.js
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 //-----------------------------------------------------------------------------
39 var BUGNUMBER = 464862;
40 var summary = 'Do not assert: ( int32_t(delta) == uint8_t(delta) )';
41 var actual = '';
42 var expect = '';
43
44 printBugNumber(BUGNUMBER);
45 printStatus (summary);
46
47 function ygTreeView(id) {
48   this.init(id);
49 }
50
51 ygTreeView.prototype.init = function (id) {this.root = new ygRootNode(this);};
52
53 function ygNode() {}
54
55 ygNode.prototype.nextSibling = null;
56
57 ygNode.prototype.init = function (_32, _33, _34) {
58   this.children = [];
59   this.expanded = _34;
60   if (_33) {
61     this.tree = _33.tree;
62     this.depth = _33.depth + 1;
63     _33.appendChild(this);
64   }
65 };
66
67 ygNode.prototype.appendChild = function (_35) {
68   if (this.hasChildren()) {
69     var sib = this.children[this.children.length - 1];
70   }
71   this.children[this.children.length] = _35;
72 };
73
74 ygNode.prototype.getElId = function () {};
75
76 ygNode.prototype.getNodeHtml = function () {};
77
78 ygNode.prototype.getToggleElId = function () {};
79
80 ygNode.prototype.getStyle = function () {
81   var loc = this.nextSibling ? "t" : "l";
82   var _39 = "n";
83   if (this.hasChildren(true)) {}
84 };
85
86 ygNode.prototype.hasChildren = function () {return this.children.length > 0;};
87
88 ygNode.prototype.getHtml = function () {
89   var sb = [];
90   sb[sb.length] = "<div class=\"ygtvitem\" id=\"" + this.getElId() + "\">";
91   sb[sb.length] = this.getNodeHtml();
92   sb[sb.length] = this.getChildrenHtml();
93 };
94
95 ygNode.prototype.getChildrenHtml = function () {
96   var sb = [];
97   if (this.hasChildren(true) && this.expanded) {
98     sb[sb.length] = this.renderChildren();
99   }
100 };
101
102 ygNode.prototype.renderChildren = function () {return this.completeRender();};
103
104 ygNode.prototype.completeRender = function () {
105   var sb = [];
106   for (var i = 0; i < this.children.length; ++i) {
107     sb[sb.length] = this.children[i].getHtml();
108   }
109 };
110
111 ygRootNode.prototype = new ygNode;
112
113 function ygRootNode(_48) {
114   this.init(null, null, true);
115 }
116
117 ygTextNode.prototype = new ygNode;
118
119 function ygTextNode(_49, _50, _51) {
120   this.init(_49, _50, _51);
121   this.setUpLabel(_49);
122 }
123
124 ygTextNode.prototype.setUpLabel = function (_52) {
125   if (typeof _52 == "string") {}
126   if (_52.target) {}
127   this.labelElId = "ygtvlabelel" + this.index;
128 };
129
130 ygTextNode.prototype.getNodeHtml = function () {
131   var sb = new Array;
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 + "\"";
139 };
140
141 function buildUserTree() {
142   userTree = new ygTreeView("userTree");
143   addMenuNode(userTree, "N", "navheader");
144   addMenuNode(userTree, "R", "navheader");
145   addMenuNode(userTree, "S", "navheader");
146 }
147
148 function addMenuNode(tree, label, styleClass) {
149   new ygTextNode({}, tree.root, false);
150 }
151
152 buildUserTree();
153 userTree.root.getHtml();
154
155 reportCompare(expect, actual, summary);