js/src/tests/js1_5/Regress/regress-464862.js

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     2 /* This Source Code Form is subject to the terms of the Mozilla Public
     3  * License, v. 2.0. If a copy of the MPL was not distributed with this
     4  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     6 //-----------------------------------------------------------------------------
     7 var BUGNUMBER = 464862;
     8 var summary = 'Do not assert: ( int32_t(delta) == uint8_t(delta) )';
     9 var actual = '';
    10 var expect = '';
    12 printBugNumber(BUGNUMBER);
    13 printStatus (summary);
    15 function ygTreeView(id) {
    16   this.init(id);
    17 }
    19 ygTreeView.prototype.init = function (id) {this.root = new ygRootNode(this);};
    21 function ygNode() {}
    23 ygNode.prototype.nextSibling = null;
    25 ygNode.prototype.init = function (_32, _33, _34) {
    26   this.children = [];
    27   this.expanded = _34;
    28   if (_33) {
    29     this.tree = _33.tree;
    30     this.depth = _33.depth + 1;
    31     _33.appendChild(this);
    32   }
    33 };
    35 ygNode.prototype.appendChild = function (_35) {
    36   if (this.hasChildren()) {
    37     var sib = this.children[this.children.length - 1];
    38   }
    39   this.children[this.children.length] = _35;
    40 };
    42 ygNode.prototype.getElId = function () {};
    44 ygNode.prototype.getNodeHtml = function () {};
    46 ygNode.prototype.getToggleElId = function () {};
    48 ygNode.prototype.getStyle = function () {
    49   var loc = this.nextSibling ? "t" : "l";
    50   var _39 = "n";
    51   if (this.hasChildren(true)) {}
    52 };
    54 ygNode.prototype.hasChildren = function () {return this.children.length > 0;};
    56 ygNode.prototype.getHtml = function () {
    57   var sb = [];
    58   sb[sb.length] = "<div class=\"ygtvitem\" id=\"" + this.getElId() + "\">";
    59   sb[sb.length] = this.getNodeHtml();
    60   sb[sb.length] = this.getChildrenHtml();
    61 };
    63 ygNode.prototype.getChildrenHtml = function () {
    64   var sb = [];
    65   if (this.hasChildren(true) && this.expanded) {
    66     sb[sb.length] = this.renderChildren();
    67   }
    68 };
    70 ygNode.prototype.renderChildren = function () {return this.completeRender();};
    72 ygNode.prototype.completeRender = function () {
    73   var sb = [];
    74   for (var i = 0; i < this.children.length; ++i) {
    75     sb[sb.length] = this.children[i].getHtml();
    76   }
    77 };
    79 ygRootNode.prototype = new ygNode;
    81 function ygRootNode(_48) {
    82   this.init(null, null, true);
    83 }
    85 ygTextNode.prototype = new ygNode;
    87 function ygTextNode(_49, _50, _51) {
    88   this.init(_49, _50, _51);
    89   this.setUpLabel(_49);
    90 }
    92 ygTextNode.prototype.setUpLabel = function (_52) {
    93   if (typeof _52 == "string") {}
    94   if (_52.target) {}
    95   this.labelElId = "ygtvlabelel" + this.index;
    96 };
    98 ygTextNode.prototype.getNodeHtml = function () {
    99   var sb = new Array;
   100   sb[sb.length] = "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">";
   101   sb[sb.length] = "<tr>";
   102   for (i = 0; i < this.depth; ++i) {}
   103   sb[sb.length] = " id=\"" + this.getToggleElId() + "\"";
   104   sb[sb.length] = " class=\"" + this.getStyle() + "\"";
   105   if (this.hasChildren(true)) {}
   106   sb[sb.length] = " id=\"" + this.labelElId + "\"";
   107 };
   109 function buildUserTree() {
   110   userTree = new ygTreeView("userTree");
   111   addMenuNode(userTree, "N", "navheader");
   112   addMenuNode(userTree, "R", "navheader");
   113   addMenuNode(userTree, "S", "navheader");
   114 }
   116 function addMenuNode(tree, label, styleClass) {
   117   new ygTextNode({}, tree.root, false);
   118 }
   120 buildUserTree();
   121 userTree.root.getHtml();
   123 reportCompare(expect, actual, summary);

mercurial