tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

regress-464862.js (3254B)


      1 /* -*- indent-tabs-mode: nil; js-indent-level: 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/. */
      5 
      6 //-----------------------------------------------------------------------------
      7 var BUGNUMBER = 464862;
      8 var summary = 'Do not assert: ( int32_t(delta) == uint8_t(delta) )';
      9 var actual = '';
     10 var expect = '';
     11 
     12 printBugNumber(BUGNUMBER);
     13 printStatus (summary);
     14 
     15 function ygTreeView(id) {
     16  this.init(id);
     17 }
     18 
     19 ygTreeView.prototype.init = function (id) {this.root = new ygRootNode(this);};
     20 
     21 function ygNode() {}
     22 
     23 ygNode.prototype.nextSibling = null;
     24 
     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 };
     34 
     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 };
     41 
     42 ygNode.prototype.getElId = function () {};
     43 
     44 ygNode.prototype.getNodeHtml = function () {};
     45 
     46 ygNode.prototype.getToggleElId = function () {};
     47 
     48 ygNode.prototype.getStyle = function () {
     49  var loc = this.nextSibling ? "t" : "l";
     50  var _39 = "n";
     51  if (this.hasChildren(true)) {}
     52 };
     53 
     54 ygNode.prototype.hasChildren = function () {return this.children.length > 0;};
     55 
     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 };
     62 
     63 ygNode.prototype.getChildrenHtml = function () {
     64  var sb = [];
     65  if (this.hasChildren(true) && this.expanded) {
     66    sb[sb.length] = this.renderChildren();
     67  }
     68 };
     69 
     70 ygNode.prototype.renderChildren = function () {return this.completeRender();};
     71 
     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 };
     78 
     79 ygRootNode.prototype = new ygNode;
     80 
     81 function ygRootNode(_48) {
     82  this.init(null, null, true);
     83 }
     84 
     85 ygTextNode.prototype = new ygNode;
     86 
     87 function ygTextNode(_49, _50, _51) {
     88  this.init(_49, _50, _51);
     89  this.setUpLabel(_49);
     90 }
     91 
     92 ygTextNode.prototype.setUpLabel = function (_52) {
     93  if (typeof _52 == "string") {}
     94  if (_52.target) {}
     95  this.labelElId = "ygtvlabelel" + this.index;
     96 };
     97 
     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 };
    108 
    109 function buildUserTree() {
    110  userTree = new ygTreeView("userTree");
    111  addMenuNode(userTree, "N", "navheader");
    112  addMenuNode(userTree, "R", "navheader");
    113  addMenuNode(userTree, "S", "navheader");
    114 }
    115 
    116 function addMenuNode(tree, label, styleClass) {
    117  new ygTextNode({}, tree.root, false);
    118 }
    119 
    120 buildUserTree();
    121 userTree.root.getHtml();
    122 
    123 reportCompare(expect, actual, summary);