NOBUG: Fixed file access permissions
[moodle.git] / lib / yuilib / 3.13.0 / io-queue / io-queue-coverage.js
blobbcb456bee1e2ff0b00e37e0c46007de508d9515a
1 /*
2 YUI 3.13.0 (build 508226d)
3 Copyright 2013 Yahoo! Inc. All rights reserved.
4 Licensed under the BSD License.
5 http://yuilibrary.com/license/
6 */
8 if (typeof __coverage__ === 'undefined') { __coverage__ = {}; }
9 if (!__coverage__['build/io-queue/io-queue.js']) {
10    __coverage__['build/io-queue/io-queue.js'] = {"path":"build/io-queue/io-queue.js","s":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0},"b":{"1":[0,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[0,0],"6":[0,0]},"f":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0},"fnMap":{"1":{"name":"(anonymous_1)","line":1,"loc":{"start":{"line":1,"column":20},"end":{"line":1,"column":39}}},"2":{"name":"(anonymous_2)","line":45,"loc":{"start":{"line":45,"column":13},"end":{"line":45,"column":24}}},"3":{"name":"(anonymous_3)","line":62,"loc":{"start":{"line":62,"column":11},"end":{"line":62,"column":28}}},"4":{"name":"(anonymous_4)","line":67,"loc":{"start":{"line":67,"column":32},"end":{"line":67,"column":48}}},"5":{"name":"(anonymous_5)","line":79,"loc":{"start":{"line":79,"column":12},"end":{"line":79,"column":25}}},"6":{"name":"(anonymous_6)","line":93,"loc":{"start":{"line":93,"column":14},"end":{"line":93,"column":26}}},"7":{"name":"(anonymous_7)","line":105,"loc":{"start":{"line":105,"column":13},"end":{"line":105,"column":25}}},"8":{"name":"(anonymous_8)","line":117,"loc":{"start":{"line":117,"column":12},"end":{"line":117,"column":23}}},"9":{"name":"(anonymous_9)","line":121,"loc":{"start":{"line":121,"column":12},"end":{"line":121,"column":23}}},"10":{"name":"(anonymous_10)","line":139,"loc":{"start":{"line":139,"column":11},"end":{"line":139,"column":22}}},"11":{"name":"(anonymous_11)","line":151,"loc":{"start":{"line":151,"column":11},"end":{"line":151,"column":22}}},"12":{"name":"_queue","line":157,"loc":{"start":{"line":157,"column":0},"end":{"line":157,"column":22}}},"13":{"name":"(anonymous_13)","line":161,"loc":{"start":{"line":161,"column":15},"end":{"line":161,"column":27}}},"14":{"name":"(anonymous_14)","line":162,"loc":{"start":{"line":162,"column":14},"end":{"line":162,"column":26}}},"15":{"name":"(anonymous_15)","line":163,"loc":{"start":{"line":163,"column":17},"end":{"line":163,"column":30}}},"16":{"name":"(anonymous_16)","line":164,"loc":{"start":{"line":164,"column":16},"end":{"line":164,"column":29}}},"17":{"name":"(anonymous_17)","line":165,"loc":{"start":{"line":165,"column":14},"end":{"line":165,"column":26}}},"18":{"name":"(anonymous_18)","line":166,"loc":{"start":{"line":166,"column":15},"end":{"line":166,"column":27}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":170,"column":57}},"2":{"start":{"line":10,"column":0},"end":{"line":10,"column":41}},"3":{"start":{"line":12,"column":0},"end":{"line":155,"column":9}},"4":{"start":{"line":46,"column":8},"end":{"line":47,"column":29}},"5":{"start":{"line":49,"column":8},"end":{"line":49,"column":29}},"6":{"start":{"line":50,"column":8},"end":{"line":50,"column":23}},"7":{"start":{"line":51,"column":8},"end":{"line":51,"column":36}},"8":{"start":{"line":63,"column":8},"end":{"line":64,"column":52}},"9":{"start":{"line":66,"column":8},"end":{"line":69,"column":9}},"10":{"start":{"line":67,"column":12},"end":{"line":67,"column":72}},"11":{"start":{"line":67,"column":50},"end":{"line":67,"column":64}},"12":{"start":{"line":68,"column":12},"end":{"line":68,"column":29}},"13":{"start":{"line":71,"column":8},"end":{"line":71,"column":21}},"14":{"start":{"line":72,"column":8},"end":{"line":74,"column":9}},"15":{"start":{"line":73,"column":12},"end":{"line":73,"column":25}},"16":{"start":{"line":76,"column":8},"end":{"line":76,"column":17}},"17":{"start":{"line":80,"column":8},"end":{"line":80,"column":22}},"18":{"start":{"line":81,"column":8},"end":{"line":81,"column":23}},"19":{"start":{"line":82,"column":8},"end":{"line":84,"column":9}},"20":{"start":{"line":83,"column":12},"end":{"line":83,"column":25}},"21":{"start":{"line":94,"column":8},"end":{"line":94,"column":27}},"22":{"start":{"line":106,"column":8},"end":{"line":106,"column":26}},"23":{"start":{"line":118,"column":8},"end":{"line":118,"column":32}},"24":{"start":{"line":122,"column":8},"end":{"line":122,"column":22}},"25":{"start":{"line":123,"column":8},"end":{"line":123,"column":23}},"26":{"start":{"line":125,"column":8},"end":{"line":127,"column":9}},"27":{"start":{"line":126,"column":12},"end":{"line":126,"column":25}},"28":{"start":{"line":140,"column":8},"end":{"line":140,"column":25}},"29":{"start":{"line":152,"column":8},"end":{"line":152,"column":30}},"30":{"start":{"line":157,"column":0},"end":{"line":159,"column":1}},"31":{"start":{"line":158,"column":4},"end":{"line":158,"column":38}},"32":{"start":{"line":161,"column":0},"end":{"line":161,"column":44}},"33":{"start":{"line":161,"column":29},"end":{"line":161,"column":41}},"34":{"start":{"line":162,"column":0},"end":{"line":162,"column":42}},"35":{"start":{"line":162,"column":28},"end":{"line":162,"column":39}},"36":{"start":{"line":163,"column":0},"end":{"line":163,"column":50}},"37":{"start":{"line":163,"column":32},"end":{"line":163,"column":47}},"38":{"start":{"line":164,"column":0},"end":{"line":164,"column":48}},"39":{"start":{"line":164,"column":31},"end":{"line":164,"column":45}},"40":{"start":{"line":165,"column":0},"end":{"line":165,"column":42}},"41":{"start":{"line":165,"column":28},"end":{"line":165,"column":39}},"42":{"start":{"line":166,"column":0},"end":{"line":166,"column":44}},"43":{"start":{"line":166,"column":29},"end":{"line":166,"column":41}},"44":{"start":{"line":167,"column":0},"end":{"line":167,"column":20}}},"branchMap":{"1":{"line":10,"type":"binary-expr","locations":[{"start":{"line":10,"column":9},"end":{"line":10,"column":26}},{"start":{"line":10,"column":30},"end":{"line":10,"column":40}}]},"2":{"line":66,"type":"if","locations":[{"start":{"line":66,"column":8},"end":{"line":66,"column":8}},{"start":{"line":66,"column":8},"end":{"line":66,"column":8}}]},"3":{"line":72,"type":"if","locations":[{"start":{"line":72,"column":8},"end":{"line":72,"column":8}},{"start":{"line":72,"column":8},"end":{"line":72,"column":8}}]},"4":{"line":82,"type":"if","locations":[{"start":{"line":82,"column":8},"end":{"line":82,"column":8}},{"start":{"line":82,"column":8},"end":{"line":82,"column":8}}]},"5":{"line":82,"type":"binary-expr","locations":[{"start":{"line":82,"column":12},"end":{"line":82,"column":32}},{"start":{"line":82,"column":36},"end":{"line":82,"column":52}}]},"6":{"line":125,"type":"if","locations":[{"start":{"line":125,"column":8},"end":{"line":125,"column":8}},{"start":{"line":125,"column":8},"end":{"line":125,"column":8}}]}},"code":["(function () { YUI.add('io-queue', function (Y, NAME) {","","/**","Extends IO to implement Queue for synchronous","transaction processing.","@module io","@submodule io-queue","@for IO","**/","var io = Y.io._map['io:0'] || new Y.IO();","","Y.mix(Y.IO.prototype, {","   /**","    * Array of transactions queued for processing","    *","    * @property _q","    * @private","    * @static","    * @type {Object}","    */","    _q: new Y.Queue(),","    _qActiveId: null,","    _qInit: false,","","   /**","    * Property to determine whether the queue is set to","    * 1 (active) or 0 (inactive).  When inactive, transactions","    * will be stored in the queue until the queue is set to active.","    *","    * @property _qState","    * @private","    * @static","    * @type {Number}","    */","    _qState: 1,","","   /**","    * Method Process the first transaction from the","    * queue in FIFO order.","    *","    * @method _qShift","    * @private","    * @static","    */","    _qShift: function() {","        var io = this,","            o = io._q.next();","","        io._qActiveId = o.id;","        io._qState = 0;","        io.send(o.uri, o.cfg, o.id);","    },","","   /**","    * Method for queueing a transaction before the request is sent to the","    * resource, to ensure sequential processing.","    *","    * @method queue","    * @static","    * @return {Object}","    */","    queue: function(uri, c) {","        var io = this,","            o = { uri: uri, cfg:c, id: this._id++ };","","        if(!io._qInit) {","            Y.on('io:complete', function(id, o) { io._qNext(id); }, io);","            io._qInit = true;","        }","","        io._q.add(o);","        if (io._qState === 1) {","            io._qShift();","        }","","        return o;","    },","","    _qNext: function(id) {","        var io = this;","        io._qState = 1;","        if (io._qActiveId === id && io._q.size() > 0) {","            io._qShift();","        }","    },","","   /**","    * Method for promoting a transaction to the top of the queue.","    *","    * @method promote","    * @static","    */","    qPromote: function(o) {","        this._q.promote(o);","    },","","   /**","    * Method for removing a specific, pending transaction from","    * the queue.","    *","    * @method remove","    * @private","    * @static","    */","    qRemove: function(o) {","        this._q.remove(o);","    },","","   /**","    * Method for cancel all pending transaction from","    * the queue.","    *","    * @method empty","    * @static","    * @since 3.7.3","    */","    qEmpty: function() {","        this._q = new Y.Queue();","    },","","    qStart: function() {","        var io = this;","        io._qState = 1;","","        if (io._q.size() > 0) {","            io._qShift();","        }","    },","","   /**","    * Method for setting queue processing to inactive.","    * Transaction requests to YUI.io.queue() will be stored in the queue, but","    * not processed until the queue is reset to \"active\".","    *","    * @method _stop","    * @private","    * @static","    */","    qStop: function() {","        this._qState = 0;","    },","","   /**","    * Method to query the current size of the queue.","    *","    * @method _size","    * @private","    * @static","    * @return {Number}","    */","    qSize: function() {","        return this._q.size();","    }","","}, true);","","function _queue(u, c) {","    return io.queue.apply(io, [u, c]);","}","","_queue.start = function () { io.qStart(); };","_queue.stop = function () { io.qStop(); };","_queue.promote = function (o) { io.qPromote(o); };","_queue.remove = function (o) { io.qRemove(o); };","_queue.size = function () { io.qSize(); };","_queue.empty = function () { io.qEmpty(); };","Y.io.queue = _queue;","","","}, '3.13.0', {\"requires\": [\"io-base\", \"queue-promote\"]});","","}());"]};
12 var __cov_gCvC4RVEtFMbkP8iDe0dhw = __coverage__['build/io-queue/io-queue.js'];
13 __cov_gCvC4RVEtFMbkP8iDe0dhw.s['1']++;YUI.add('io-queue',function(Y,NAME){__cov_gCvC4RVEtFMbkP8iDe0dhw.f['1']++;__cov_gCvC4RVEtFMbkP8iDe0dhw.s['2']++;var io=(__cov_gCvC4RVEtFMbkP8iDe0dhw.b['1'][0]++,Y.io._map['io:0'])||(__cov_gCvC4RVEtFMbkP8iDe0dhw.b['1'][1]++,new Y.IO());__cov_gCvC4RVEtFMbkP8iDe0dhw.s['3']++;Y.mix(Y.IO.prototype,{_q:new Y.Queue(),_qActiveId:null,_qInit:false,_qState:1,_qShift:function(){__cov_gCvC4RVEtFMbkP8iDe0dhw.f['2']++;__cov_gCvC4RVEtFMbkP8iDe0dhw.s['4']++;var io=this,o=io._q.next();__cov_gCvC4RVEtFMbkP8iDe0dhw.s['5']++;io._qActiveId=o.id;__cov_gCvC4RVEtFMbkP8iDe0dhw.s['6']++;io._qState=0;__cov_gCvC4RVEtFMbkP8iDe0dhw.s['7']++;io.send(o.uri,o.cfg,o.id);},queue:function(uri,c){__cov_gCvC4RVEtFMbkP8iDe0dhw.f['3']++;__cov_gCvC4RVEtFMbkP8iDe0dhw.s['8']++;var io=this,o={uri:uri,cfg:c,id:this._id++};__cov_gCvC4RVEtFMbkP8iDe0dhw.s['9']++;if(!io._qInit){__cov_gCvC4RVEtFMbkP8iDe0dhw.b['2'][0]++;__cov_gCvC4RVEtFMbkP8iDe0dhw.s['10']++;Y.on('io:complete',function(id,o){__cov_gCvC4RVEtFMbkP8iDe0dhw.f['4']++;__cov_gCvC4RVEtFMbkP8iDe0dhw.s['11']++;io._qNext(id);},io);__cov_gCvC4RVEtFMbkP8iDe0dhw.s['12']++;io._qInit=true;}else{__cov_gCvC4RVEtFMbkP8iDe0dhw.b['2'][1]++;}__cov_gCvC4RVEtFMbkP8iDe0dhw.s['13']++;io._q.add(o);__cov_gCvC4RVEtFMbkP8iDe0dhw.s['14']++;if(io._qState===1){__cov_gCvC4RVEtFMbkP8iDe0dhw.b['3'][0]++;__cov_gCvC4RVEtFMbkP8iDe0dhw.s['15']++;io._qShift();}else{__cov_gCvC4RVEtFMbkP8iDe0dhw.b['3'][1]++;}__cov_gCvC4RVEtFMbkP8iDe0dhw.s['16']++;return o;},_qNext:function(id){__cov_gCvC4RVEtFMbkP8iDe0dhw.f['5']++;__cov_gCvC4RVEtFMbkP8iDe0dhw.s['17']++;var io=this;__cov_gCvC4RVEtFMbkP8iDe0dhw.s['18']++;io._qState=1;__cov_gCvC4RVEtFMbkP8iDe0dhw.s['19']++;if((__cov_gCvC4RVEtFMbkP8iDe0dhw.b['5'][0]++,io._qActiveId===id)&&(__cov_gCvC4RVEtFMbkP8iDe0dhw.b['5'][1]++,io._q.size()>0)){__cov_gCvC4RVEtFMbkP8iDe0dhw.b['4'][0]++;__cov_gCvC4RVEtFMbkP8iDe0dhw.s['20']++;io._qShift();}else{__cov_gCvC4RVEtFMbkP8iDe0dhw.b['4'][1]++;}},qPromote:function(o){__cov_gCvC4RVEtFMbkP8iDe0dhw.f['6']++;__cov_gCvC4RVEtFMbkP8iDe0dhw.s['21']++;this._q.promote(o);},qRemove:function(o){__cov_gCvC4RVEtFMbkP8iDe0dhw.f['7']++;__cov_gCvC4RVEtFMbkP8iDe0dhw.s['22']++;this._q.remove(o);},qEmpty:function(){__cov_gCvC4RVEtFMbkP8iDe0dhw.f['8']++;__cov_gCvC4RVEtFMbkP8iDe0dhw.s['23']++;this._q=new Y.Queue();},qStart:function(){__cov_gCvC4RVEtFMbkP8iDe0dhw.f['9']++;__cov_gCvC4RVEtFMbkP8iDe0dhw.s['24']++;var io=this;__cov_gCvC4RVEtFMbkP8iDe0dhw.s['25']++;io._qState=1;__cov_gCvC4RVEtFMbkP8iDe0dhw.s['26']++;if(io._q.size()>0){__cov_gCvC4RVEtFMbkP8iDe0dhw.b['6'][0]++;__cov_gCvC4RVEtFMbkP8iDe0dhw.s['27']++;io._qShift();}else{__cov_gCvC4RVEtFMbkP8iDe0dhw.b['6'][1]++;}},qStop:function(){__cov_gCvC4RVEtFMbkP8iDe0dhw.f['10']++;__cov_gCvC4RVEtFMbkP8iDe0dhw.s['28']++;this._qState=0;},qSize:function(){__cov_gCvC4RVEtFMbkP8iDe0dhw.f['11']++;__cov_gCvC4RVEtFMbkP8iDe0dhw.s['29']++;return this._q.size();}},true);__cov_gCvC4RVEtFMbkP8iDe0dhw.s['30']++;function _queue(u,c){__cov_gCvC4RVEtFMbkP8iDe0dhw.f['12']++;__cov_gCvC4RVEtFMbkP8iDe0dhw.s['31']++;return io.queue.apply(io,[u,c]);}__cov_gCvC4RVEtFMbkP8iDe0dhw.s['32']++;_queue.start=function(){__cov_gCvC4RVEtFMbkP8iDe0dhw.f['13']++;__cov_gCvC4RVEtFMbkP8iDe0dhw.s['33']++;io.qStart();};__cov_gCvC4RVEtFMbkP8iDe0dhw.s['34']++;_queue.stop=function(){__cov_gCvC4RVEtFMbkP8iDe0dhw.f['14']++;__cov_gCvC4RVEtFMbkP8iDe0dhw.s['35']++;io.qStop();};__cov_gCvC4RVEtFMbkP8iDe0dhw.s['36']++;_queue.promote=function(o){__cov_gCvC4RVEtFMbkP8iDe0dhw.f['15']++;__cov_gCvC4RVEtFMbkP8iDe0dhw.s['37']++;io.qPromote(o);};__cov_gCvC4RVEtFMbkP8iDe0dhw.s['38']++;_queue.remove=function(o){__cov_gCvC4RVEtFMbkP8iDe0dhw.f['16']++;__cov_gCvC4RVEtFMbkP8iDe0dhw.s['39']++;io.qRemove(o);};__cov_gCvC4RVEtFMbkP8iDe0dhw.s['40']++;_queue.size=function(){__cov_gCvC4RVEtFMbkP8iDe0dhw.f['17']++;__cov_gCvC4RVEtFMbkP8iDe0dhw.s['41']++;io.qSize();};__cov_gCvC4RVEtFMbkP8iDe0dhw.s['42']++;_queue.empty=function(){__cov_gCvC4RVEtFMbkP8iDe0dhw.f['18']++;__cov_gCvC4RVEtFMbkP8iDe0dhw.s['43']++;io.qEmpty();};__cov_gCvC4RVEtFMbkP8iDe0dhw.s['44']++;Y.io.queue=_queue;},'3.13.0',{'requires':['io-base','queue-promote']});