/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
//-----------------------------------------------------------------------------
var BUGNUMBER =
464862;
var summary =
'Do not assert: ( int32_t(delta) == uint8_t(delta) )';
var actual =
'';
var expect =
'';
printBugNumber(BUGNUMBER);
printStatus (summary);
function ygTreeView(id) {
this.init(id);
}
ygTreeView.prototype.init =
function (id) {
this.root =
new ygRootNode(
this);};
function ygNode() {}
ygNode.prototype.nextSibling =
null;
ygNode.prototype.init =
function (_
32, _
33, _
34) {
this.children = [];
this.expanded = _
34;
if (_
33) {
this.tree = _
33.tree;
this.depth = _
33.depth +
1;
_
33.appendChild(
this);
}
};
ygNode.prototype.appendChild =
function (_
35) {
if (
this.hasChildren()) {
var sib =
this.children[
this.children.length -
1];
}
this.children[
this.children.length] = _
35;
};
ygNode.prototype.getElId =
function () {};
ygNode.prototype.getNodeHtml =
function () {};
ygNode.prototype.getToggleElId =
function () {};
ygNode.prototype.getStyle =
function () {
var loc =
this.nextSibling ?
"t" :
"l";
var _
39 =
"n";
if (
this.hasChildren(
true)) {}
};
ygNode.prototype.hasChildren =
function () {
return this.children.length >
0;};
ygNode.prototype.getHtml =
function () {
var sb = [];
sb[sb.length] =
"<div class=\"ygtvitem\
" id=\"" + this.getElId() + "\
">";
sb[sb.length] =
this.getNodeHtml();
sb[sb.length] =
this.getChildrenHtml();
};
ygNode.prototype.getChildrenHtml =
function () {
var sb = [];
if (
this.hasChildren(
true) &&
this.expanded) {
sb[sb.length] =
this.renderChildren();
}
};
ygNode.prototype.renderChildren =
function () {
return this.completeRender();};
ygNode.prototype.completeRender =
function () {
var sb = [];
for (
var i =
0; i <
this.children.length; ++i) {
sb[sb.length] =
this.children[i].getHtml();
}
};
ygRootNode.prototype =
new ygNode;
function ygRootNode(_
48) {
this.init(
null,
null,
true);
}
ygTextNode.prototype =
new ygNode;
function ygTextNode(_
49, _
50, _
51) {
this.init(_
49, _
50, _
51);
this.setUpLabel(_
49);
}
ygTextNode.prototype.setUpLabel =
function (_
52) {
if (
typeof _
52 ==
"string") {}
if (_
52.target) {}
this.labelElId =
"ygtvlabelel" +
this.index;
};
ygTextNode.prototype.getNodeHtml =
function () {
var sb =
new Array;
sb[sb.length] =
"<table border=\"0\
" cellpadding=\"0\
" cellspacing=\"0\
">";
sb[sb.length] =
"<tr>";
for (i =
0; i <
this.depth; ++i) {}
sb[sb.length] =
" id=\"" + this.getToggleElId() + "\
"";
sb[sb.length] =
" class=\"" + this.getStyle() + "\
"";
if (
this.hasChildren(
true)) {}
sb[sb.length] =
" id=\"" + this.labelElId + "\
"";
};
function buildUserTree() {
userTree =
new ygTreeView(
"userTree");
addMenuNode(userTree,
"N",
"navheader");
addMenuNode(userTree,
"R",
"navheader");
addMenuNode(userTree,
"S",
"navheader");
}
function addMenuNode(tree, label, styleClass) {
new ygTextNode({}, tree.root,
false);
}
buildUserTree();
userTree.root.getHtml();
reportCompare(expect, actual, summary);