GIF89a=( �' 7IAXKgNgYvYx\%wh&h}t�h%�s%x�}9�R��&�0%� (�.��5�SD��&�a)�x5��;ͣ*ȡ&ղ)ׯ7׵<ѻ4�3�H֧KͯT��Y�aq��q��F� !� ' !� NETSCAPE2.0 , =( ��pH,�Ȥr�l:xШtJ�Z�جv��z��xL.:��z�n���|N�����~�������& !�0`9R�}��"�"a:S�~x��������g���E�������R���E����B�� ��ȸ��D���"�Ů� �H��L��D٫D�B�����D���T���H �G��A R�ڐ |�� ٭&��E8�S�kG�A�px�a��� R2XB��E8I���6X�:vT)�~��q�賥��"F~%x� � 4#Z�0O|-4Bs�X:= Q� Sal��yXJ`GȦ|s h��K3l7�B|�$'7Jީܪ0!��D�n=�P� ����0`�R�lj����v>���5 �.69�ϸd�����nlv�9��f{���Pbx �l5}�p� ��� �3a���I�O����!ܾ���i��9��#��)p�a ޽ �{�)vm��%D~ 6f��s}Œ�D�W E�`!� �&L8x� �ܝ{)x`X/>�}m��R�*|`D�=�_ ^�5 !_&'a�O�7�c��`DCx`�¥�9�Y�F���`?��"� �n@`�} lď��@4>�d S �v�xN��"@~d��=�g�s~G��� ���ud &p8Q�)ƫlXD����A~H�ySun�j���k*D�LH�] ��C"J��Xb~ʪwSt}6K,��q�S:9ت:���l�@�`�� �.۬�t9�S�[:��=`9N����{¿�A !R�:���6��x�0�_ �;������^���#����!����U���;0L1�����p% A��U̬ݵ��%�S��!���~`�G���� ���=4�np�3���������u�u�ٮ|%2�I��r�#0��J``8�@S@5� ���^`8E�]�.�S���7 � �0�j S�D� z���i�S�����!���l��w9*�D�I�nEX��� &A�Go�Qf��F��;���}�J����F5��Q|���X��T��y���]� o ��C=��:���PB@ D׽S�(>�C�x}`��xJЬ�۠��p+eE0`�}`A �/NE�� �9@��� H�7�!%B0`�l*��!8 2�%� �:�1�0E��ux%nP1�!�C)�P81l�ɸF#Ƭ{����B0>�� �b�`��O3��()yRpb��E.ZD8�H@% �Rx+%���c� ���f��b�d�`F�"8�XH"��-�|1�6iI, 2�$+](A*j� QT�o0.�U�`�R�}`�SN����yae�����b��o~ S)�y�@��3 �tT�0�&�+~L�f"�-|�~��>!�v��~�\Q1)}@�}h#aP72�"�$ !� " , =( &7IAXG]KgNgYvYxR"k\%w]'}h}t�h%�g+�s%r.m3ax3�x�}9��&��+�!7�0%� (�.�SD��&��;�"&ײ)׻4��6�K� �@pH,�Ȥr�l:xШtJ�Z�جv��z��xL.:��z�n���|N�����~�������& !�0`9R�}��"�"a:S�~x��������g �� E �� �������E �´��C���ǶR��D��"Ʒ�ʱH��M��GڬD�B����D��T����G���C�C� l&�~:'�tU�6ɹ#��)�'�.6�&��Ȼ K(8p0N�?!�2"��NIJX>R��OM '��2�*x�>#n� �@<[:�I�f ��T���Cdb��[�}E�5MBo��@�`@��tW-3 �x�B���jI�&E�9[T&$��ﯧ&"s��ȳ����dc�UUρ#���ldj?����`\}���u|3'�R]�6 �S#�!�FKL�*N E���`$�:e�YD�q�.�촁�s \-�jA 9�����-��M[�x(�s��x�|���p��}k�T�DpE@W� ��]k`1� ���Yb ��0l��*n0��"~zBd�~u�7�0Bl��0-�x~|U�U0 �h�*HS�|��e"#"?vp�i`e6^�+q��`m8 #V�� ��VS|`��"m"сSn|@:U���~`pb�G�ED����2F�I�? >�x� R� ��%~jx��<�a�9ij�2�D��&: Z`�]w���:�6��B�7eFJ|�ҧ�,���FǮcS�ʶ+B�,�ܺN���>PAD�HD��~���n��}�#�� Q��S���2�X�{�k�lQ�2�����w�|2� h9��G�,m���3��6-��E�L��I�³*K���q�`DwV�QXS��peS��� qܧTS����R�u �<�a�*At�lmE� � ��N[P1�ۦ��$��@`��Dpy�yXvCAy�B`}D� 0QwG#� �a[^�� $���Ǧ{L�"[��K�g�;�S~��GX.�goT.��ư��x���?1z��x~:�g�|�L� ��S`��0S]P�^p F<""�?!,�!N4&P� ����:T�@h�9%t��:�-~�I<`�9p I&.)^ 40D#p@�j4�ج:�01��rܼF2oW�#Z ;$Q q  �K��Nl#29 !F@�Bh�ᏬL!XF�LHKh�.�hE&J�G��<"WN!�����Y@� >R~19J"�2,/ &.GXB%�R�9B6�W]���W�I�$��9�RE8Y� ��"�A5�Q.axB�&ة�J�! �t)K%tS-�JF b�NMxL��)�R��"���6O!TH�H� 0 !� ) , =( &AXKgNgYvYxR"k\%wh&h}h%�g+�s%r.x3�x�}9��&��+�R,�!7�0%� (�.��5��&�a)��;�"&ף*Ȳ)ׯ7׻4�3��6�H֧KͻH�T��Y��q��h� ��pH,�Ȥr�l:xШtJ�Z�جv��z��xL.:��z�n���|N�����~�������& !�0`9R�}��"�"a:S�~x��������g �� E$����� � ����$E$��"��D� � ������R��C��� E ��H�M��G�D� �B��ϾD��a��`1r��Ӑ�� �o~�zU!L�C'�yW�UGt����ll�0���uG�)A�s[��x� �xO%��X2�  P�n:R/��aHae+�Dm?# ǣ6�8�J�x�Di�M���j���5oQ7�- <! *�l��R2r/a!l)d� A"�E���� &� ;��c �%����b��pe~C"B���H�eF2��`8qb�t_`ur`e� w�u3��Pv�h""�`�Íx�LĹ��3� �~ֺ�:���MDfJ� �۵�W�%�S�X �؁)�@��:E��w�u�Sxb8y\m�zS��Zb�E�L��w!y(>�"w�=�|��s�d �C�W)H�cC$�L �7r.�\{)@�`@ �X�$PD `aaG:���O�72E�amn]�"Rc�x�R� &dR8`g��i�xLR!�P &d����T���i�|�_ � Qi�#�`g:��:noM� :V �)p����W&a=�e�k� j���1߲s�x�W�jal|0��B0�, \j۴:6���C ��W��|��9���zĸV {�;��n��V�m�I��.��PN� ����C��+��By�ѾHŸ:��� 7�Y�FTk�SaoaY$D�S���29R�kt� ��f� ��:��Sp�3�I��DZ� �9���g��u�*3)O��[_hv ,���Et x�BH� �[��64M@�S�M7d�l�ܶ5-��U܍��z�R3Ԭ3~ ��P��5�g: ���kN�&0�j4���#{��3S�2�K�'ợl���2K{� {۶?~m𸧠�I�nE�='����^���_�=��~�#O���'���o..�Y�n��CSO��a��K��o,���b�����{�C�� "�{�K ��w��Ozdը�:$ ���v�] A#� ���a�z)Rx׿ƥ�d``�w-�y�f�K!����|��P��=�`�(f��'Pa ��BJa%��f�%`�}F����6>��`G"�}�=�!o`�^FP�ةQ�C���`(�}\�ݮ ��$<��n@dĠE#��U�I�!� #l��9`k���'Rr��Z�NB�MF �[�+9���-�wj���8�r� ,V�h"�|�S=�G_��"E� 0i*%̲��da0mVk�):;&6p>�jK ��# �D�:�c?:R Ӭf��I-�"�<�="��7�3S��c2RW ,�8(T"P0F¡Jh�" ; 403WebShell
403Webshell
Server IP : 81.88.48.95  /  Your IP : 10.2.217.94, 216.73.216.34
Web Server : Apache
System : Linux opus08 3.2.0-4-amd64 #1 SMP Debian 3.2.68-1+deb7u3 x86_64
User : nobody ( 99)
PHP Version : 5.3.3-7+squeeze3
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /web/sites/vhbu/1/14/102637/vendor/swiftmailer/swiftmailer/test-suite/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /web/sites/vhbu/1/14/102637/vendor/swiftmailer/swiftmailer/test-suite/sweety.js
/*
 JavaScript wrapper around REST API in Sweety.
 */

/**
 * A convenience class for using XPath.
 * @author Chris Corbyn
 * @constructor
 */
function SweetyXpath() {
  
  /**
   * Get the first node matching the given expression.
   * @param {String} expr
   * @param {Element} node
   * @returns Element
   */
  this.getFirstNode = function getFirstNode(expr, node) {
    var firstNode = _getRootNode(node).evaluate(
      expr, node, _getNsResolver(node), XPathResult.FIRST_ORDERED_NODE_TYPE, null);
    return firstNode.singleNodeValue;
  },
  
  /**
   * Get all nodes matching the given expression.
   * The returned result is a Node Snapshot.
   * @param {String} expr
   * @param {Element} node
   * @returns Element[]
   */
  this.getNodes = function getNodes(expr, node) {
    var nodes = _getRootNode(node).evaluate(
      expr, node, _getNsResolver(node), XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
    
    var nodeSet = new Array();
    for (var i = 0, len = nodes.snapshotLength; i < len; i++) {
      nodeSet.push(nodes.snapshotItem(i));
    }
    return nodeSet;
  },
  
  /**
   * Get the string value of the node matching the given expression.
   * @param {String} expr
   * @param {Element} node
   * @returns String
   */
  this.getValue = function getValue(expr, node) {
    return _getRootNode(node).evaluate(
      expr, node, _getNsResolver(node), XPathResult.STRING_TYPE, null).stringValue;
  }
  
  /**
   * Get the root node from which run evaluate.
   * @param {Element} node
   * @returns Element
   */
  var _getRootNode = function _getRootNode(node) {
    if (node.ownerDocument && node.ownerDocument.evaluate) {
      return node.ownerDocument;
    } else {
      if (node.evaluate) {
        return node;
      } else {
        return document;
      }
    }
  }
  
  /**
   * Get the NS Resolver used when searching.
   * @param {Element} node
   * @returns Element
   */
  var _getNsResolver = function _getNsResolver(node) {
    if (!document.createNSResolver) {
      return null;
    }
    
    if (node.ownerDocument) {
      return document.createNSResolver(node.ownerDocument.documentElement);
    } else {
      return document.createNSResolver(node.documentElement);
    }
  }
  
}

/**
 * The reporter interface so Sweety can tell the UI what's happening.
 * @author Chris Corbyn
 * @constructor
 */
function SweetyReporter() { //Interface/Base Class
  
  var _this = this;
  
  /**
   * Create a sub-reporter for an individual test case.
   * @param {String} testCaseName
   * @returns SweetyReporter
   */
  this.getReporterFor = function getReporterFor(testCaseName) {
    return _this;
  }
  
  /**
   * Start reporting.
   */
  this.start = function start() {
  }
  
  /**
   * Handle a skipped test case.
   * @param {String} message
   * @param {String} path
   */
  this.reportSkip = function reportSkip(message, path) {
  }
  
  /**
   * Handle a passing assertion.
   * @param {String} message
   * @param {String} path
   */
  this.reportPass = function reportPass(message, path) {
  }
  
  /**
   * Handle a failing assertion.
   * @param {String} message
   * @param {String} path
   */
  this.reportFail = function reportFail(message, path) {
  }
  
  /**
   * Handle an unexpected exception.
   * @param {String} message
   * @param {String} path
   */
  this.reportException = function reportException(message, path) {
  }
  
  /**
   * Handle miscellaneous test output.
   * @param {String} output
   * @param {String} path
   */
  this.reportOutput = function reportOutput(output, path) {
  }
  
  /**
   * Finish reporting.
   */
  this.finish = function finish() {
  }
  
}


/**
 * Represents a single test case being run.
 * @author Chris Corbyn
 * @constructor
 */
function SweetyTestCaseRun(testClass, reporter) {
  
  var _this = this;
  
  /** The XMLHttpRequest used in testing */
  var _req;
  
  /** XPath handler */
  var _xpath = new SweetyXpath();
  
  /** Callback function for completion event */
  this.oncompletion = function oncompletion() {
  }
  
  /**
   * Run this test.
   */
  this.run = function run() {
    if (!reporter.isStarted()) {
      reporter.start();
    }
    _req = _createHttpRequest();
    
    if (!_req) {
      return;
    }
    
    _req.open("GET", "?test=" + testClass + "&format=xml", true);
    _req.onreadystatechange = _handleXml;
    _req.send(null);
  }
  
  /**
   * Get an XmlHttpRequest instance, cross browser compatible.
   * @return Object
   */
  var _createHttpRequest = function _createHttpRequest() {
    var req = false;
    
    if (window.XMLHttpRequest && !(window.ActiveXObject)) {
      try {
        req = new XMLHttpRequest();
      } catch(e) {
        req = false;
      }
    } else if (window.ActiveXObject) {
      try {
        req = new ActiveXObject("Msxml2.XMLHTTP");
      } catch(e) {
        try {
          req = new ActiveXObject("Microsoft.XMLHTTP");
        } catch(e) {
          req = false;
        }
      }
    }
    
    return req;
  }
  
  /**
   * Handle the XML response from the test.
   */
  var _handleXml = function _handleXml() {
    if (_req.readyState == 4) {
      try {
        
        var xml = _req.responseXML;
        var txt = _req.responseText.replace(/[\r\n]+/g, "").
          replace(/^(.+)<\?xml.*$/, "$1");
        
        //Test case was skipped
        var skipElements = xml.getElementsByTagName('skip');
        if (!skipElements || 1 != skipElements.length)
        {
          var runElements = xml.getElementsByTagName('run');
          //Invalid document, an error probably occured
          if (!runElements || 1 != runElements.length) {
            reporter.reportException(
              "Invalid XML response: " +
              _stripTags(txt.replace(/^\s*<\?xml.+<\/(?:name|pass|fail|exception)>/g, "")), testClass);
          } else {
            var everything = runElements.item(0);
            _parseResults(everything, testClass);
            reporter.finish();
          }
        }
        else
        {
          reporter.reportSkip(_textValueOf(skipElements.item(0)), testClass);
          reporter.finish();
        }
      } catch (ex) {
        //Invalid document or an error occurred.
        reporter.reportException(
          "Invalid XML response: " +
          _stripTags(txt.replace(/^\s*<\?xml.+<\/(?:name|pass|fail|exception)>/g, "")), testClass);
      }
      
      //Invoke the callback
      _this.oncompletion();
    }
  }
  
  /**
   * Cross browser method for reading the value of a node in XML.
   * @param {Element} node
   * @returns String
   */
  var _textValueOf = function _textValueOf(node) {
    if (!node.textContent && node.text) {
      return node.text;
    } else {
      return node.textContent;
    }
  }
  
  var _stripTags = function _stripTags(txt) {
    txt = txt.replace(/[\r\n]+/g, "");
    return txt.replace(
      /<\/?(?:a|b|br|p|strong|u|i|em|span|div|ul|ol|li|table|thead|tbody|th|td|tr)\b.*?\/?>/g,
      "");
  }
  
  /**
   * Parse an arbitrary message output.
   * @param {Element} node
   * @param {String} path
   */
  var _parseMessage = function _parseMessage(node, path) {
    reporter.reportOutput(_textValueOf(node), path);
  }
  
  /**
   * Parse formatted text output (such as a dump()).
   * @param {Element} node
   * @param {String} path
   */
  var _parseFormatted = function _parseFormatted(node, path) {
    reporter.reportOutput(_textValueOf(node), path);
  }
  
  /**
   * Parse failing test assertion.
   * @param {Element} node
   * @param {String} path
   */
  var _parseFail = function _parseFail(node, path) {
    reporter.reportFail(_textValueOf(node), path);
  }
  
  /**
   * Parse an Exception.
   * @param {Element} node
   * @param {String} path
   */
  var _parseException = function _parseException(node, path) {
    reporter.reportException(_textValueOf(node), path);
  }
  
  /**
   * Parse passing test assertion.
   * @param {Element} node
   * @param {String} path
   */
  var _parsePass = function _parsePass(node, path) {
    reporter.reportPass(_textValueOf(node), path);
  }
  
  /**
   * Parse an entire test case
   * @param {Element} node
   * @param {String} path
   */
  var _parseTestCase = function _parseTestCase(node, path) {
    var testMethodNodes = _xpath.getNodes("./test", node);
    
    for (var x in testMethodNodes) {
      var testMethodNode = testMethodNodes[x];
      var testMethodName = _xpath.getValue("./name", testMethodNode);
      
      var formattedNodes = _xpath.getNodes("./formatted", testMethodNode);
      for (var i in formattedNodes) {
        var formattedNode = formattedNodes[i];
        _parseFormatted(formattedNode, path + " -> " + testMethodName);
      }
      
      var messageNodes = _xpath.getNodes("./message", testMethodNode);
      for (var i in messageNodes) {
        var messageNode = messageNodes[i];
        _parseMessage(messageNode, path + " -> " + testMethodName);
      }
      
      var failNodes = _xpath.getNodes("./fail", testMethodNode);
      for (var i in failNodes) {
        var failNode = failNodes[i];
        _parseFail(failNode, path + " -> " + testMethodName);
      }
      
      var exceptionNodes = _xpath.getNodes("./exception", testMethodNode);
      for (var i in exceptionNodes) {
        var exceptionNode = exceptionNodes[i];
        _parseException(exceptionNode, path + " -> " + testMethodName);
      }
      
      var passNodes = _xpath.getNodes("./pass", testMethodNode);
      for (var i in passNodes) {
        var passNode = passNodes[i];
        _parsePass(passNode, path + " -> " + testMethodName);
      }
    }
  }
  
  /**
   * Parse an entire grouped or single test case.
   * @param {Element} node
   * @param {String} path
   */
  var _parseResults = function _parseResults(node, path) {
    var groupNodes = _xpath.getNodes("./group", node);
    
    if (0 != groupNodes.length) {
      for (var i in groupNodes) {
        var groupNode = groupNodes[i];
        var groupName = _xpath.getValue("./name", groupNode);
        _parseResults(groupNode, path + " -> " + groupName);
      }
    } else {
      var caseNodes = _xpath.getNodes("./case", node);
      for (var i in caseNodes) {
        var caseNode = caseNodes[i];
        _parseTestCase(caseNode, path);
      }
    }
  }
  
}

/**
 * Runs a list of test cases.
 * @author Chris Corbyn
 * @constructor
 */
function SweetyTestRunner() {
  
  var _this = this;
  
  SweetyTestRunner._currentInstance = _this;
  
  /** True if the test runner has been stopped */
  var _cancelled = false;
  
  /**
   * Invoked to cause the test runner to stop execution at the next available
   * opportunity.  If XML is being parsed in another thread, or an AJAX request
   * is in progress the test runner will wait until the next test.
   * @param {Boolean} cancel
   */
  this.cancelTesting = function cancelTesting(cancel) {
    _cancelled = cancel;
  }
  
  /**
   * Run the given list of test cases.
   * @param {String[]} tests
   * @param {SweetyReporter} reporter
   */
  this.runTests = function runTests(tests, reporter) {
    if (!reporter.isStarted()) {
      reporter.start();
    }
    
    if (_cancelled || !tests || !tests.length) {
      _cancelled = false;
      reporter.finish();
      return;
    }
    
    var testCase = tests.shift();
    
    var caseReporter = reporter.getReporterFor(testCase);
    
    var testRun = new SweetyTestCaseRun(testCase, caseReporter);
    
    //Repeat until no tests remaining in list
    // Ok, I know, I know I'll try to eradicate this lazy use of recursion
    testRun.oncompletion = function() {
      _this.runTests(tests, reporter);
    };
    
    testRun.run();
  }
  
}

/** Active instance */
SweetyTestRunner._currentInstance = null;

/**
 * Fetches the currently running instance of the TestRunner.
 * @returns SweetyTestRunner
 */
SweetyTestRunner.getCurrentInstance = function getCurrentInstance() {
  return this._currentInstance;
}

Youez - 2016 - github.com/yon3zu
LinuXploit