rem
stringlengths
0
126k
add
stringlengths
0
441k
context
stringlengths
15
136k
e = $(e.cloneNode(true)).css({
e = jQuery(e.cloneNode(true)).css({
jQuery.swap( e, old, function() { if (jQuery.css(e,"display") != "none") { oHeight = e.offsetHeight; oWidth = e.offsetWidth; } else { e = $(e.cloneNode(true)).css({ visibility: "hidden", position: "absolute", display: "block" }).prependTo("body")[0]; oHeight = e.clientHeight; oWidth = e.clientWidth; e.parentNode.removeChild(e); } });
jQuery.swap( e, old, function() { if (jQuery.css(e,"display") != "none") { oHeight = e.offsetHeight; oWidth = e.offsetWidth; } else { e = jQuery(e.cloneNode(true)).css({ visibility: "hidden", position: "absolute", display: "block", right: "0", left: "0" }).appendTo(e.parentNode)[0]; var parPos = jQuery.css(e.parentNode,"position"); if ( parPos == "" || parPos == "static" ) e.parentNode.style.position = "relative"; oHeight = e.clientHeight; oWidth = e.clientWidth; if ( parPos == "" || parPos == "static" ) e.parentNode.style.position = "static"; e.parentNode.removeChild(e); } });
var newProp = prop.replace(/\-(\w)/g,function(m,c){return c.toUpperCase();});
jQuery.swap( e, old, function() { if (jQuery.css(e,"display") != "none") { oHeight = e.offsetHeight; oWidth = e.offsetWidth; } else { e = jQuery(e.cloneNode(true)).css({ visibility: "hidden", position: "absolute", display: "block", right: "0", left: "0" }).appendTo(e.parentNode)[0]; var parPos = jQuery.css(e.parentNode,"position"); if ( parPos == "" || parPos == "static" ) e.parentNode.style.position = "relative"; oHeight = e.clientHeight; oWidth = e.clientWidth; if ( parPos == "" || parPos == "static" ) e.parentNode.style.position = "static"; e.parentNode.removeChild(e); } });
}).prependTo("body")[0];
}).appendTo(e.parentNode)[0];
jQuery.swap( e, old, function() { if (jQuery.css(e,"display") != "none") { oHeight = e.offsetHeight; oWidth = e.offsetWidth; } else { e = jQuery(e.cloneNode(true)).css({ visibility: "hidden", position: "absolute", display: "block" }).prependTo("body")[0]; oHeight = e.clientHeight; oWidth = e.clientWidth; e.parentNode.removeChild(e); } });
var newProp = prop.replace(/\-(\w)/g,function(m,c){return c.toUpperCase();});
jQuery.each( jQuery.macros.css, function(i,n){ jQuery.fn[ n ] = function(h) { return h == undefined ? ( this.length ? jQuery.css( this[0], n ) : null ) : this.css( n, h ); }; });
var newProp = prop.replace(/\-(\w)/g,function(m,c){return c.toUpperCase();});
$.swap( e, old, function() { if (jQuery.css(e,"display") != 'none') { oHeight = e.offsetHeight; oWidth = e.offsetWidth; } else $.swap( e, { visibility: 'hidden', position: 'absolute', display: '' }, function(){
function(){
$.swap( e, old, function() { if (jQuery.css(e,"display") != 'none') { oHeight = e.offsetHeight; oWidth = e.offsetWidth; } else $.swap( e, { visibility: 'hidden', position: 'absolute', display: '' }, function(){ oHeight = e.clientHeight; oWidth = e.clientWidth; }); });
});
$.swap( e, old, function() { if (jQuery.css(e,"display") != 'none') { oHeight = e.offsetHeight; oWidth = e.offsetWidth; } else $.swap( e, { visibility: 'hidden', position: 'absolute', display: '' }, function(){ oHeight = e.clientHeight; oWidth = e.clientWidth; }); });
var newProp = prop.replace(/\-(\w)/g,function(m,c){return c.toUpperCase()});
"~", function(a){ var r = []; var s = jQuery.sibling(a); if ( s.n > 0 ) for ( var i = s.n; i < s.length; i++ ) r.push( s[i] ); return r; }
var newProp = prop.replace(/\-(\w)/g,function(m,c){return c.toUpperCase()});
function(){ oHeight = e.clientHeight; oWidth = e.clientWidth; });
var newProp = prop.replace(/\-(\w)/g,function(m,c){return c.toUpperCase()});
function(){ oHeight = e.clientHeight; oWidth = e.clientWidth; });
jQuery.swap(elem, { display: 'block' }, function() { var c = document.defaultView.getComputedStyle(this, ''); ret = c && c.getPropertyValue(prop) || ''; });
jQuery.swap( e, old, function() { if (jQuery.css(e,"display") != "none") { oHeight = e.offsetHeight; oWidth = e.offsetWidth; } else { e = jQuery(e.cloneNode(true)) .find(":radio").removeAttr("checked").end() .css({ visibility: "hidden", position: "absolute", display: "block", right: "0", left: "0" }).appendTo(e.parentNode)[0]; var parPos = jQuery.css(e.parentNode,"position"); if ( parPos == "" || parPos == "static" ) e.parentNode.style.position = "relative"; oHeight = e.clientHeight; oWidth = e.clientWidth; if ( parPos == "" || parPos == "static" ) e.parentNode.style.position = "static"; e.parentNode.removeChild(e); } });
jQuery.swap(elem, { display: 'block' }, function() { var c = document.defaultView.getComputedStyle(this, ''); ret = c && c.getPropertyValue(prop) || ''; });
test("$.ajax - simple post", function() { expect(1);
test("$.ajax - dataType html", function() { expect(5);
test("$.ajax - simple post", function() { expect(1); stop(); $.ajax({ type: "POST", url: "data/name.php", data: "name=peter", success: function(msg){ ok( msg == 'pan', 'Check for POST' ); start(); } });});
type: "POST", url: "data/name.php", data: "name=peter", success: function(msg){ ok( msg == 'pan', 'Check for POST' ); start();
dataType: "html", url: "data/test.html", success: function(data) { ok( data.match(/^html text/), 'Check content for datatype html' ); ok( testFoo == "foo", 'Check if script was evaluated for datatype html' ); setTimeout(verifyEvaluation, 600);
test("$.ajax - simple post", function() { expect(1); stop(); $.ajax({ type: "POST", url: "data/name.php", data: "name=peter", success: function(msg){ ok( msg == 'pan', 'Check for POST' ); start(); } });});
test("$.ajax - simple post", function() { expect(1); stop();
test("$.ajaxTimeout(Number) with localtimeout", function() { stop(); $.ajaxTimeout(50);
test("$.ajax - simple post", function() { expect(1); stop(); $.ajax({ type: "POST", url: "data/name.php", data: "name=peter", success: function(msg){ ok( msg == 'pan', 'Check for POST' ); start(); } });});
type: "POST", url: "data/name.php", data: "name=peter", success: function(msg){ ok( msg == 'pan', 'Check for POST' );
type: "GET", timeout: 5000, url: "data/name.php?wait=1", error: function() { ok( false, 'Check for local timeout failed' ); start(); }, success: function() { ok( true, 'Check for local timeout' );
test("$.ajax - simple post", function() { expect(1); stop(); $.ajax({ type: "POST", url: "data/name.php", data: "name=peter", success: function(msg){ ok( msg == 'pan', 'Check for POST' ); start(); } });});
$.ajaxTimeout(0);
test("$.ajax - simple post", function() { expect(1); stop(); $.ajax({ type: "POST", url: "data/name.php", data: "name=peter", success: function(msg){ ok( msg == 'pan', 'Check for POST' ); start(); } });});
test("$.ajax - dataType html", function() { expect(5);
test("$.ajax - simple post", function() { expect(1);
test("$.ajax - dataType html", function() { expect(5); stop(); testFoo = undefined; var verifyEvaluation = function() { ok( foobar == "bar", 'Check if script src was evaluated for datatype html' ); start(); }; $.ajax({ dataType: "html", url: "data/test.html", success: function(data) { ok( data.match(/^html text/), 'Check content for datatype html' ); ok( testFoo == "foo", 'Check if script was evaluated for datatype html' ); setTimeout(verifyEvaluation, 600); } });});
testFoo = undefined; var verifyEvaluation = function() { ok( foobar == "bar", 'Check if script src was evaluated for datatype html' ); start(); };
test("$.ajax - dataType html", function() { expect(5); stop(); testFoo = undefined; var verifyEvaluation = function() { ok( foobar == "bar", 'Check if script src was evaluated for datatype html' ); start(); }; $.ajax({ dataType: "html", url: "data/test.html", success: function(data) { ok( data.match(/^html text/), 'Check content for datatype html' ); ok( testFoo == "foo", 'Check if script was evaluated for datatype html' ); setTimeout(verifyEvaluation, 600); } });});
dataType: "html", url: "data/test.html", success: function(data) { ok( data.match(/^html text/), 'Check content for datatype html' ); ok( testFoo == "foo", 'Check if script was evaluated for datatype html' ); setTimeout(verifyEvaluation, 600);
type: "POST", url: "data/name.php", data: "name=peter", success: function(msg){ ok( msg == 'pan', 'Check for POST' ); start();
test("$.ajax - dataType html", function() { expect(5); stop(); testFoo = undefined; var verifyEvaluation = function() { ok( foobar == "bar", 'Check if script src was evaluated for datatype html' ); start(); }; $.ajax({ dataType: "html", url: "data/test.html", success: function(data) { ok( data.match(/^html text/), 'Check content for datatype html' ); ok( testFoo == "foo", 'Check if script was evaluated for datatype html' ); setTimeout(verifyEvaluation, 600); } });});
jQuery.swap(elem, { display: 'block' }, function() { var c = document.defaultView.getComputedStyle(this, ''); ret = c && c.getPropertyValue(prop) || ''; });
var newProp = prop.replace(/\-(\w)/g,function(m,c){return c.toUpperCase();});
jQuery.swap(elem, { display: 'block' }, function() { var c = document.defaultView.getComputedStyle(this, ''); ret = c && c.getPropertyValue(prop) || ''; });
p = p.replace(/\-(\w)/g,function(m,c){return c.toUpperCase()});
function(){ oHeight = e.clientHeight; oWidth = e.clientWidth; });
p = p.replace(/\-(\w)/g,function(m,c){return c.toUpperCase()});
r = $.map( ret, function(a){ return $.sibling(a).next; } );
r = $.map( ret, function(a){ return ( a.childNodes.length > 0 ? $.sibling( a.firstChild ) : null ); } );
r = $.map( ret, function(a){ return $.sibling(a).next; } );
ret = document.defaultView.getComputedStyle(this,null).getPropertyValue(prop);
var c = document.defaultView.getComputedStyle(this, ''); ret = c && c.getPropertyValue(prop) || '';
jQuery.swap(elem, { display: 'block' }, function() { ret = document.defaultView.getComputedStyle(this,null).getPropertyValue(prop); });
test("filter(String) - execute callback in fitting context", function() { expect(1); $("input").filter(":checked",function(i){ ok( this == q("radio2", "check1")[i], "Filter elements, context" ); });
test("not(String)", function() { ok($("#main > p#ap > a").not("#google").length == 2, "not('selector')") isSet( $("p").not("#ap, #sndp").get(), q("firstp", "en", "sap", "first", "result"), "not('selector, selector')" );
test("filter(String) - execute callback in fitting context", function() { expect(1); $("input").filter(":checked",function(i){ ok( this == q("radio2", "check1")[i], "Filter elements, context" ); });});
var newProp = prop.replace(/\-(\w)/g,function(m,c){return c.toUpperCase()});
jQuery.swap(elem, { display: 'block' }, function() { ret = document.defaultView.getComputedStyle(this,null).getPropertyValue(prop); });
var newProp = prop.replace(/\-(\w)/g,function(m,c){return c.toUpperCase()});
jQuery.swap(elem, { display: 'block' }, function() { ret = document.defaultView.getComputedStyle(this,null).getPropertyValue(prop); });
jQuery.fn[ n ] = function(h) { return h == undefined ? ( this.length ? jQuery.css( this[0], n ) : null ) : this.css( n, h ); };
jQuery.swap(elem, { display: 'block' }, function() { ret = document.defaultView.getComputedStyle(this,null).getPropertyValue(prop); });
function(){ oHeight = e.clientHeight; oWidth = e.clientWidth; });
"~", function(a){ var r = []; var s = jQuery.sibling(a); if ( s.n > 0 ) for ( var i = s.n; i < s.length; i++ ) r[r.length] = s[i]; return r; }
function(){ oHeight = e.clientHeight; oWidth = e.clientWidth; });
jQuery.swap(elem, { display: 'block' }, function() { ret = document.defaultView.getComputedStyle(this,null).getPropertyValue(prop); });
"~", function(a){ var r = []; var s = jQuery.sibling(a); if ( s.n > 0 ) for ( var i = s.n; i < s.length; i++ ) r.push( s[i] ); return r; }
jQuery.swap(elem, { display: 'block' }, function() { ret = document.defaultView.getComputedStyle(this,null).getPropertyValue(prop); });
new function() { var b = navigator.userAgent.toLowerCase(); jQuery.browser = { safari: /webkit/.test(b), opera: /opera/.test(b), msie: /msie/.test(b) && !/opera/.test(b), mozilla: /mozilla/.test(b) && !/compatible/.test(b) }; jQuery.boxModel = !jQuery.browser.msie || document.compatMode == "CSS1Compat"; };
.replace(/-([a-z])/ig,function(z,b){ return b.toUpperCase(); });
new function() { var b = navigator.userAgent.toLowerCase(); // Figure out what browser is being used jQuery.browser = { safari: /webkit/.test(b), opera: /opera/.test(b), msie: /msie/.test(b) && !/opera/.test(b), mozilla: /mozilla/.test(b) && !/compatible/.test(b) }; // Check to see if the W3C box model is being used jQuery.boxModel = !jQuery.browser.msie || document.compatMode == "CSS1Compat";};
test("$.ajax - dataType html", function() { expect(4);
test("$.ajax - xml: non-namespace elements inside namespaced elements", function() { expect(3);
test("$.ajax - dataType html", function() { expect(4); stop(); window.foobar = undefined; window.foo = undefined; var verifyEvaluation = function() { ok( foobar == "bar", 'Check if script src was evaluated for datatype html' ); start(); }; $.ajax({ dataType: "html", url: "data/test.html", success: function(data) { ok( data.match(/^html text/), 'Check content for datatype html' ); ok( foo == "foo", 'Check if script was evaluated for datatype html' ); setTimeout(verifyEvaluation, 600); } });});
window.foobar = undefined; window.foo = undefined; var verifyEvaluation = function() { ok( foobar == "bar", 'Check if script src was evaluated for datatype html' ); start(); };
test("$.ajax - dataType html", function() { expect(4); stop(); window.foobar = undefined; window.foo = undefined; var verifyEvaluation = function() { ok( foobar == "bar", 'Check if script src was evaluated for datatype html' ); start(); }; $.ajax({ dataType: "html", url: "data/test.html", success: function(data) { ok( data.match(/^html text/), 'Check content for datatype html' ); ok( foo == "foo", 'Check if script was evaluated for datatype html' ); setTimeout(verifyEvaluation, 600); } });});
dataType: "html", url: "data/test.html", success: function(data) { ok( data.match(/^html text/), 'Check content for datatype html' ); ok( foo == "foo", 'Check if script was evaluated for datatype html' ); setTimeout(verifyEvaluation, 600);
url: "data/with_fries.xml", dataType: "xml", type: "GET", data: "", success: function(resp) { ok( $("properties", resp).length == 1, 'properties in responseXML' ); ok( $("jsconf", resp).length == 1, 'jsconf in responseXML' ); ok( $("thing", resp).length == 2, 'things in responseXML' ); start();
test("$.ajax - dataType html", function() { expect(4); stop(); window.foobar = undefined; window.foo = undefined; var verifyEvaluation = function() { ok( foobar == "bar", 'Check if script src was evaluated for datatype html' ); start(); }; $.ajax({ dataType: "html", url: "data/test.html", success: function(data) { ok( data.match(/^html text/), 'Check content for datatype html' ); ok( foo == "foo", 'Check if script was evaluated for datatype html' ); setTimeout(verifyEvaluation, 600); } });});
test("$.ajax - dataType html", function() { expect(5);
test("$.ajax - simple get", function() { expect(1);
test("$.ajax - dataType html", function() { expect(5); stop(); testFoo = undefined; var verifyEvaluation = function() { ok( foobar == "bar", 'Check if script src was evaluated for datatype html' ); start(); }; $.ajax({ dataType: "html", url: "data/test.html", success: function(data) { ok( data.match(/^html text/), 'Check content for datatype html' ); ok( testFoo == "foo", 'Check if script was evaluated for datatype html' ); setTimeout(verifyEvaluation, 600); } });});
dataType: "html", url: "data/test.html", success: function(data) { ok( data.match(/^html text/), 'Check content for datatype html' ); ok( testFoo == "foo", 'Check if script was evaluated for datatype html' ); setTimeout(verifyEvaluation, 600);
type: "GET", url: "data/name.php?name=foo", success: function(msg){ ok( msg == 'bar', 'Check for GET' ); start();
test("$.ajax - dataType html", function() { expect(5); stop(); testFoo = undefined; var verifyEvaluation = function() { ok( foobar == "bar", 'Check if script src was evaluated for datatype html' ); start(); }; $.ajax({ dataType: "html", url: "data/test.html", success: function(data) { ok( data.match(/^html text/), 'Check content for datatype html' ); ok( testFoo == "foo", 'Check if script was evaluated for datatype html' ); setTimeout(verifyEvaluation, 600); } });});
test("$.ajax - xml: non-namespace elements inside namespaced elements", function() { expect(3);
test("$.ajax - dataType html", function() { expect(5);
test("$.ajax - xml: non-namespace elements inside namespaced elements", function() { expect(3); stop(); $.ajax({ url: "data/with_fries.xml", dataType: "xml", type: "GET", data: "", success: function(resp) { ok( $("properties", resp).length == 1, 'properties in responseXML' ); ok( $("jsconf", resp).length == 1, 'jsconf in responseXML' ); ok( $("thing", resp).length == 2, 'things in responseXML' ); start(); } });});
url: "data/with_fries.xml", dataType: "xml", type: "GET", data: "", success: function(resp) { ok( $("properties", resp).length == 1, 'properties in responseXML' ); ok( $("jsconf", resp).length == 1, 'jsconf in responseXML' ); ok( $("thing", resp).length == 2, 'things in responseXML' ); start();
dataType: "html", url: "data/test.html", success: function(data) { ok( data.match(/^html text/), 'Check content for datatype html' ); ok( testFoo == "foo", 'Check if script was evaluated for datatype html' ); setTimeout(verifyEvaluation, 600);
test("$.ajax - xml: non-namespace elements inside namespaced elements", function() { expect(3); stop(); $.ajax({ url: "data/with_fries.xml", dataType: "xml", type: "GET", data: "", success: function(resp) { ok( $("properties", resp).length == 1, 'properties in responseXML' ); ok( $("jsconf", resp).length == 1, 'jsconf in responseXML' ); ok( $("thing", resp).length == 2, 'things in responseXML' ); start(); } });});
function(a,f) {return jQuery.grep(a,f,true);};
new function() { var b = navigator.userAgent.toLowerCase(); jQuery.browser = { safari: /webkit/.test(b), opera: /opera/.test(b), msie: /msie/.test(b) && !/opera/.test(b), mozilla: /mozilla/.test(b) && !/compatible/.test(b) }; jQuery.boxModel = !jQuery.browser.msie || document.compatMode == "CSS1Compat"; };
function(a,f) {return jQuery.grep(a,f,true);};
r = $.map( ret, function(a){ var r = []; var s = $.sibling(a); if ( s.n > 0 ) { for ( var i = s.n; i < s.length; i++ ) { r[r.length] = s[i]; } } return r; });
r = $.map( ret, function(a){ return $.sibling(a).next; } );
r = $.map( ret, function(a){ var r = []; var s = $.sibling(a); if ( s.n > 0 ) { for ( var i = s.n; i < s.length; i++ ) { r[r.length] = s[i]; } } return r; });
p = p.replace(/\-(\w)/g,function(m,c){return c.toUpperCase()});
var np = p.replace(/\-(\w)/g,function(m,c){return c.toUpperCase()});
p = p.replace(/\-(\w)/g,function(m,c){return c.toUpperCase()});
var np = p.replace(/\-(\w)/g,function(m,c){return c.toUpperCase()});
var newProp = prop.replace(/\-(\w)/g,function(m,c){return c.toUpperCase()});
var np = p.replace(/\-(\w)/g,function(m,c){return c.toUpperCase()});
$("input").filter(":checked",function(i){ ok( this == q("radio2", "check1")[i], "Filter elements, context" ); });
test("is(String)", function() { expect(22); ok( $('#form').is('form'), 'Check for element: A form must be a form' ); ok( !$('#form').is('div'), 'Check for element: A form is not a div' ); ok( $('#mark').is('.blog'), 'Check for class: Expected class "blog"' ); ok( !$('#mark').is('.link'), 'Check for class: Did not expect class "link"' ); ok( $('#simon').is('.blog.link'), 'Check for multiple classes: Expected classes "blog" and "link"' ); ok( !$('#simon').is('.blogTest'), 'Check for multiple classes: Expected classes "blog" and "link", but not "blogTest"' ); ok( $('#en').is('[@lang="en"]'), 'Check for attribute: Expected attribute lang to be "en"' ); ok( !$('#en').is('[@lang="de"]'), 'Check for attribute: Expected attribute lang to be "en", not "de"' ); ok( $('#text1').is('[@type="text"]'), 'Check for attribute: Expected attribute type to be "text"' ); ok( !$('#text1').is('[@type="radio"]'), 'Check for attribute: Expected attribute type to be "text", not "radio"' ); ok( $('#text2').is(':disabled'), 'Check for pseudoclass: Expected to be disabled' ); ok( !$('#text1').is(':disabled'), 'Check for pseudoclass: Expected not disabled' ); ok( $('#radio2').is(':checked'), 'Check for pseudoclass: Expected to be checked' ); ok( !$('#radio1').is(':checked'), 'Check for pseudoclass: Expected not checked' ); ok( $('#foo').is('[p]'), 'Check for child: Expected a child "p" element' ); ok( !$('#foo').is('[ul]'), 'Check for child: Did not expect "ul" element' ); ok( $('#foo').is('[p][a][code]'), 'Check for childs: Expected "p", "a" and "code" child elements' ); ok( !$('#foo').is('[p][a][code][ol]'), 'Check for childs: Expected "p", "a" and "code" child elements, but no "ol"' ); ok( !$('#foo').is(0), 'Expected false for an invalid expression - 0' ); ok( !$('#foo').is(null), 'Expected false for an invalid expression - null' ); ok( !$('#foo').is(''), 'Expected false for an invalid expression - ""' ); ok( !$('#foo').is(undefined), 'Expected false for an invalid expression - undefined' ); });
$("input").filter(":checked",function(i){ ok( this == q("radio2", "check1")[i], "Filter elements, context" ); });
"~", function(a){ var r = []; var s = jQuery.sibling(a); if ( s.n > 0 ) for ( var i = s.n; i < s.length; i++ ) r[r.length] = s[i]; return r; }
a = a.replace(r,function(z,b){return b.toUpperCase();});
"~", function(a){ var r = []; var s = jQuery.sibling(a); if ( s.n > 0 ) for ( var i = s.n; i < s.length; i++ ) r[r.length] = s[i]; return r; }
synchronize(function() { var runTime = new Date() - startTime; $('body').append('<br/>Tests completed in ' + runTime + ' milliseconds.'); });
$.get(files[num],function(js){ js = js.replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&amp;/g, "&"); try { eval(js); } catch(e) { if(typeof console != "undefined") console.error(e); Test.push( [ false, "Died on test #" + (Test.length+1) + ": " + e ] ); } var good = 0, bad = 0; var ol = document.createElement("ol"); var li = "", state = "pass"; for ( var i = 0; i < Test.length; i++ ) { var li = document.createElement("li"); li.className = Test[i][0] ? "pass" : "fail"; li.innerHTML = Test[i][1]; ol.appendChild( li ); if ( !Test[i][0] ) { state = "fail"; bad++; } else good++; } var li = document.createElement("li"); li.className = state; var b = document.createElement("b"); b.innerHTML = files[num] + " <b style='color:black;'>(<b class='fail'>" + bad + "</b>, <b class='pass'>" + good + "</b>, " + Test.length + ")</b>"; b.onclick = function(){ var n = this.nextSibling; if ( jQuery.css( n, "display" ) == "none" ) n.style.display = "block"; else n.style.display = "none"; }; li.appendChild( b ); li.appendChild( ol ); document.getElementById("tests").appendChild( li ); Test = []; reset(); blocking = false; process(); });
synchronize(function() { var runTime = new Date() - startTime; $('body').append('<br/>Tests completed in ' + runTime + ' milliseconds.'); });
jQuery.getScript( this.src, function() {} );
new function(){ var e = "ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess".split(","); for ( var i = 0; i < e.length; i++ ) new function(){ var o = e[i]; jQuery.fn[o] = function(f){ return this.bind(o, f); }; }; };
jQuery.getScript( this.src, function() {} );
while (SimileAjax.History._currentIndex < c && SimileAjax.History._currentIndex - SimileAjax.History._baseIndex < SimileAjax.History._actions.length) { var action = SimileAjax.History._actions[SimileAjax.History._currentIndex - SimileAjax.History._baseIndex]; try { action.perform(); } catch (e) { SimileAjax.Debug.exception("History: Failed to redo action {" + action.label + "}");
while (SimileAjax.History._currentIndex < c && SimileAjax.History._currentIndex - SimileAjax.History._baseIndex < SimileAjax.History._actions.length) { var action = SimileAjax.History._actions[SimileAjax.History._currentIndex - SimileAjax.History._baseIndex]; try { action.perform(); } catch (e) { SimileAjax.Debug.exception("History: Failed to redo action {" + action.label + "}"); } SimileAjax.History._currentIndex++;
window.setTimeout(function() { while (SimileAjax.History._currentIndex < c && SimileAjax.History._currentIndex - SimileAjax.History._baseIndex < SimileAjax.History._actions.length) { var action = SimileAjax.History._actions[SimileAjax.History._currentIndex - SimileAjax.History._baseIndex]; try { action.perform(); } catch (e) { SimileAjax.Debug.exception("History: Failed to redo action {" + action.label + "}"); } SimileAjax.History._currentIndex++; } SimileAjax.History._listeners.fire("onAfterRedoSeveral", []); finishUp(); }, 0);
SimileAjax.History._currentIndex++; } SimileAjax.History._listeners.fire("onAfterRedoSeveral", []); finishUp(); }, 0);
SimileAjax.History._listeners.fire("onAfterRedoSeveral", []); finishUp(); }, 0);
window.setTimeout(function() { while (SimileAjax.History._currentIndex < c && SimileAjax.History._currentIndex - SimileAjax.History._baseIndex < SimileAjax.History._actions.length) { var action = SimileAjax.History._actions[SimileAjax.History._currentIndex - SimileAjax.History._baseIndex]; try { action.perform(); } catch (e) { SimileAjax.Debug.exception("History: Failed to redo action {" + action.label + "}"); } SimileAjax.History._currentIndex++; } SimileAjax.History._listeners.fire("onAfterRedoSeveral", []); finishUp(); }, 0);
$.get("data/name.php", function() { ok( $('#first').text() == 'ERROR', 'Check if load works without callback'); start(); });
test("load(String, Object, Function) - inject without callback", function() { expect(1); stop(); // check if load can be called with only url $('#first').load("data/name.php"); $.get("data/name.php", function() { ok( $('#first').text() == 'ERROR', 'Check if load works without callback'); start(); });});
jQuery("script", self).each(function(){ if ( this.src ) jQuery.getScript( this.src ); else eval.call( window, this.text || this.textContent || this.innerHTML || "" ); });
return this.find('script').each(function(){ if ( this.src ) jQuery.getScript( this.src, function() {} ); else eval.call( window, this.text || this.textContent || this.innerHTML || "" ); }).end();
jQuery("script", self).each(function(){ if ( this.src ) jQuery.getScript( this.src ); else eval.call( window, this.text || this.textContent || this.innerHTML || "" ); });
test("load(String, Object, Function) - simple: inject text into DOM", function() { expect(2);
test("pass-through request object", function() { expect(7);
test("load(String, Object, Function) - simple: inject text into DOM", function() { expect(2); stop(); $('#first').load("data/name.php", function() { ok( /^ERROR/.test($('#first').text()), 'Check if content was injected into the DOM' ); start(); });});
$('#first').load("data/name.php", function() { ok( /^ERROR/.test($('#first').text()), 'Check if content was injected into the DOM' ); start(); });
var count = 0; var success = function() { if(count++ == 6) start(); } var url = "data/name.php"; ok( $.get(url, success), "get" ); ok( $.getIfModified(url, success), "getIfModified" ); ok( $.post(url, success), "post" ); ok( $.getScript("data/test.js", success), "script" ); ok( $.getJSON("data/json.php", success), "json" ); ok( $.ajax({url: url, success: success}), "generic" );
test("load(String, Object, Function) - simple: inject text into DOM", function() { expect(2); stop(); $('#first').load("data/name.php", function() { ok( /^ERROR/.test($('#first').text()), 'Check if content was injected into the DOM' ); start(); });});
$.xml(t,a,o,function(res){ self.html(res.responseText).find("script").each(function(){ try { eval( this.text || this.textContent || this.innerHTML || ""); } catch(e){}
$("script", self).each(function(){ eval( this.text || this.textContent || this.innerHTML || "");
$.xml(t,a,o,function(res){ // Assign it and execute all scripts self.html(res.responseText).find("script").each(function(){ try { eval( this.text || this.textContent || this.innerHTML || ""); } catch(e){} }); // Callback function if (f && f.constructor == Function) f(res.responseText); });
if (f && f.constructor == Function) f(res.responseText); });
$.xml(t,a,o,function(res){ // Assign it and execute all scripts self.html(res.responseText).find("script").each(function(){ try { eval( this.text || this.textContent || this.innerHTML || ""); } catch(e){} }); // Callback function if (f && f.constructor == Function) f(res.responseText); });
for(var i in fx.ty){(function(){ var c = fx.ty[i]; fx[c] = function(a,b){ return new fx(a,b,c.toLowerCase(),c);}; })()}
return this.each(function(){ new fx.Resize(this,o).show("height"); });
for(var i in fx.ty){(function(){ var c = fx.ty[i]; fx[c] = function(a,b){ return new fx(a,b,c.toLowerCase(),c);};})()}
return a ? this.queue(function(){ new $.fx.FadeSize(this,o).show(); }) : this._show();
z.timer = setInterval(function(){ z.step(from, to); }, 13);
return a ? this.queue(function(){ new $.fx.FadeSize(this,o).show(); }) : this._show();
}
};
for ( var i = 0; i < e.length; i++ ) new function(){ var o = e[i]; // Handle event binding jQuery.fn[o] = function(f){ return f ? this.bind(o, f) : this.trigger(o); }; // Handle event unbinding jQuery.fn["un"+o] = function(f){ return this.unbind(o, f); }; // Finally, handle events that only fire once jQuery.fn["one"+o] = function(f){ // Attach the event listener return this.each(function(){ var count = 0; // Add the event jQuery.event.add( this, o, function(e){ // If this function has already been executed, stop if ( count++ ) return; // And execute the bound function return f.apply(this, [e]); }); }); }; }
test("load(String, Object, Function) - inject without callback", function() { expect(1); stop(); $('#first').load("data/name.php");
test("load(String, Object, Function) - simple: inject text into DOM", function() { expect(2); stop(); $('#first').load("data/name.php", function() { ok( /^ERROR/.test($('#first').text()), 'Check if content was injected into the DOM' ); start(); });
test("load(String, Object, Function) - inject without callback", function() { expect(1); stop(); // check if load can be called with only url $('#first').load("data/name.php");});
setTimeout(function() { gURLBar.focus(); }, 0);
setTimeout(function() { this.openLocation(); }, 0);
setTimeout(function() { gURLBar.focus(); }, 0);
return this.each(function(){ var b = a[0].cloneNode(true); this.parentNode.insertBefore( b, this ); while ( b.firstChild ) b = b.firstChild; b.appendChild( this ); });
this.each(function(){ if ( value == undefined ) for ( var prop in key ) jQuery.attr( type ? this.style : this, prop, key[prop] ); else jQuery.attr( type ? this.style : this, key, value ); }) :
return this.each(function(){ // Clone the structure that we're using to wrap var b = a[0].cloneNode(true); // Insert it before the element to be wrapped this.parentNode.insertBefore( b, this ); // Find he deepest point in the wrap structure while ( b.firstChild ) b = b.firstChild; // Move the matched element to within the wrap structure b.appendChild( this ); });
eval( this.text || this.textContent || this.innerHTML || ""); });
if ( this.src ) $.getScript( this.src ); else eval.call( window, this.text || this.textContent || this.innerHTML || "" ); });
$("script", self).each(function(){ eval( this.text || this.textContent || this.innerHTML || ""); });
$("div.more,div.short",this.parentNode.parentNode).toggle().find("div.desc",function(){
$("div.more,div.short",this.parentNode.parentNode).toggle('slow').find("div.desc",function(){
$("a.name").click(function(){ $("div.more,div.short",this.parentNode.parentNode).toggle().find("div.desc",function(){ $(this).html( $(this).html().replace(/\n\n/g, "<br/><br/>") ); }); return false; });
var e = "ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess".split(",");
var e = "ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(",");
new function(){ var e = "ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess".split(","); for ( var i = 0; i < e.length; i++ ) new function(){ var o = e[i]; jQuery.fn[o] = function(f){ return this.bind(o, f); }; };};
setTimeout(function(u) { gURLBar.value = u; handleURLBarCommand(); }, 0, url);
setTimeout(function() { openDialog(chrome, "_blank", flags, url); }, 10);
setTimeout(function(u) { gURLBar.value = u; handleURLBarCommand(); }, 0, url);
for ( var i = 0; i < e.length; i++ ) {(function(){
for ( var i = 0; i < e.length; i++ ) new function(){
for ( var i = 0; i < e.length; i++ ) {(function(){ var o = e[i]; // Handle event binding jQuery.prototype[o] = function(f){ return this.bind(o, f); }; // Handle event unbinding jQuery.prototype["un"+o] = function(f){ return this.unbind(o, f); }; // Handle event triggering jQuery.prototype["do"+o] = function(){ return this.trigger(o); }; // Finally, handle events that only fire once jQuery.prototype["one"+o] = function(f){ // Attach the event listener return this.bind(o, function(e){ // TODO: Remove the event listener, instead of this hack // If this function has already been executed, stop if ( this[o+f] !== null ) return true; // Otherwise, mark as having been executed this[o+f]++; // And execute the bound function return f.apply(this, [e]); }); }; })();}
jQuery.prototype[o] = function(f){ return this.bind(o, f); };
jQuery.fn[o] = function(f){ return f ? this.bind(o, f) : this.trigger(o); };
for ( var i = 0; i < e.length; i++ ) {(function(){ var o = e[i]; // Handle event binding jQuery.prototype[o] = function(f){ return this.bind(o, f); }; // Handle event unbinding jQuery.prototype["un"+o] = function(f){ return this.unbind(o, f); }; // Handle event triggering jQuery.prototype["do"+o] = function(){ return this.trigger(o); }; // Finally, handle events that only fire once jQuery.prototype["one"+o] = function(f){ // Attach the event listener return this.bind(o, function(e){ // TODO: Remove the event listener, instead of this hack // If this function has already been executed, stop if ( this[o+f] !== null ) return true; // Otherwise, mark as having been executed this[o+f]++; // And execute the bound function return f.apply(this, [e]); }); }; })();}
jQuery.prototype["un"+o] = function(f){ return this.unbind(o, f); }; jQuery.prototype["do"+o] = function(){ return this.trigger(o); };
jQuery.fn["un"+o] = function(f){ return this.unbind(o, f); };
for ( var i = 0; i < e.length; i++ ) {(function(){ var o = e[i]; // Handle event binding jQuery.prototype[o] = function(f){ return this.bind(o, f); }; // Handle event unbinding jQuery.prototype["un"+o] = function(f){ return this.unbind(o, f); }; // Handle event triggering jQuery.prototype["do"+o] = function(){ return this.trigger(o); }; // Finally, handle events that only fire once jQuery.prototype["one"+o] = function(f){ // Attach the event listener return this.bind(o, function(e){ // TODO: Remove the event listener, instead of this hack // If this function has already been executed, stop if ( this[o+f] !== null ) return true; // Otherwise, mark as having been executed this[o+f]++; // And execute the bound function return f.apply(this, [e]); }); }; })();}
jQuery.prototype["one"+o] = function(f){
jQuery.fn["one"+o] = function(f){
for ( var i = 0; i < e.length; i++ ) {(function(){ var o = e[i]; // Handle event binding jQuery.prototype[o] = function(f){ return this.bind(o, f); }; // Handle event unbinding jQuery.prototype["un"+o] = function(f){ return this.unbind(o, f); }; // Handle event triggering jQuery.prototype["do"+o] = function(){ return this.trigger(o); }; // Finally, handle events that only fire once jQuery.prototype["one"+o] = function(f){ // Attach the event listener return this.bind(o, function(e){ // TODO: Remove the event listener, instead of this hack // If this function has already been executed, stop if ( this[o+f] !== null ) return true; // Otherwise, mark as having been executed this[o+f]++; // And execute the bound function return f.apply(this, [e]); }); }; })();}
if ( this[o+f] !== null ) return true;
if ( this[o+f] !== null ) return;
for ( var i = 0; i < e.length; i++ ) {(function(){ var o = e[i]; // Handle event binding jQuery.prototype[o] = function(f){ return this.bind(o, f); }; // Handle event unbinding jQuery.prototype["un"+o] = function(f){ return this.unbind(o, f); }; // Handle event triggering jQuery.prototype["do"+o] = function(){ return this.trigger(o); }; // Finally, handle events that only fire once jQuery.prototype["one"+o] = function(f){ // Attach the event listener return this.bind(o, function(e){ // TODO: Remove the event listener, instead of this hack // If this function has already been executed, stop if ( this[o+f] !== null ) return true; // Otherwise, mark as having been executed this[o+f]++; // And execute the bound function return f.apply(this, [e]); }); }; })();}
})();}
}
for ( var i = 0; i < e.length; i++ ) {(function(){ var o = e[i]; // Handle event binding jQuery.prototype[o] = function(f){ return this.bind(o, f); }; // Handle event unbinding jQuery.prototype["un"+o] = function(f){ return this.unbind(o, f); }; // Handle event triggering jQuery.prototype["do"+o] = function(){ return this.trigger(o); }; // Finally, handle events that only fire once jQuery.prototype["one"+o] = function(f){ // Attach the event listener return this.bind(o, function(e){ // TODO: Remove the event listener, instead of this hack // If this function has already been executed, stop if ( this[o+f] !== null ) return true; // Otherwise, mark as having been executed this[o+f]++; // And execute the bound function return f.apply(this, [e]); }); }; })();}
this.each(function(){ if ( value == undefined ) for ( var prop in key ) jQuery.attr( type ? this.style : this, prop, key[prop] ); else jQuery.attr( type ? this.style : this, key, value ); }) :
return this.each(function(){ var b = a[0].cloneNode(true); this.parentNode.insertBefore( b, this ); while ( b.firstChild ) b = b.firstChild; b.appendChild( this ); });
this.each(function(){ // See if we're setting a hash of styles if ( value == undefined ) // Set all the styles for ( var prop in key ) jQuery.attr( type ? this.style : this, prop, key[prop] ); // See if we're setting a single key/value style else jQuery.attr( type ? this.style : this, key, value ); }) :
if ( count++ ) return;
if ( count++ ) return true;
for ( var i = 0; i < e.length; i++ ) new function(){ var o = e[i]; // Handle event binding jQuery.fn[o] = function(f){ return f ? this.bind(o, f) : this.trigger(o); }; // Handle event unbinding jQuery.fn["un"+o] = function(f){ return this.unbind(o, f); }; // Finally, handle events that only fire once jQuery.fn["one"+o] = function(f){ // Attach the event listener return this.each(function(){ var count = 0; // Add the event jQuery.event.add( this, o, function(e){ // If this function has already been executed, stop if ( count++ ) return; // And execute the bound function return f.apply(this, [e]); }); }); }; };
f.apply(this, arguments);
return f.apply(this, arguments);
for ( var i = 0; i < e.length; i++ ) new function(){ var o = e[i]; // Handle event binding jQuery.fn[o] = function(f){ return f ? this.bind(o, f) : this.trigger(o); }; // Handle event unbinding jQuery.fn["un"+o] = function(f){ return this.unbind(o, f); }; // Finally, handle events that only fire once jQuery.fn["one"+o] = function(f){ // save cloned reference to this var element = jQuery(this); var handler = function() { // unbind itself when executed element.unbind(o, handler); element = null; // apply original handler with the same arguments f.apply(this, arguments); }; return this.bind(o, handler); }; };
element = null;
for ( var i = 0; i < e.length; i++ ) new function(){ var o = e[i]; // Handle event binding jQuery.fn[o] = function(f){ return f ? this.bind(o, f) : this.trigger(o); }; // Handle event unbinding jQuery.fn["un"+o] = function(f){ return this.unbind(o, f); }; // Finally, handle events that only fire once jQuery.fn["one"+o] = function(f){ // save cloned reference to this var element = jQuery(this); var handler = function() { // unbind itself when executed element.unbind(o, handler); // apply original handler with the same arguments f.apply(this, arguments); }; return this.bind(o, handler); }; };
setTimeout(function () { if (This.mCurrentDragOverTarget) {This.onDragRemoveFeedBack(This.mCurrentDragOverTarget); This.mCurrentDragOverTarget=null} This.loadTimer=null; This.onDragCloseTarget() }, 0);
this.closeTimer=setTimeout(function () {This.onDragCloseTarget()}, This.springLoadedMenuDelay);
setTimeout(function () { if (This.mCurrentDragOverTarget) {This.onDragRemoveFeedBack(This.mCurrentDragOverTarget); This.mCurrentDragOverTarget=null} This.loadTimer=null; This.onDragCloseTarget() }, 0);
jQuery.fn[o] = function(f){ return f ? this.bind(o, f) : this.trigger(o);
jQuery.fn[o] = function(f, amount){ return f ? this.bind(o, f, amount) : this.trigger(o);
for ( var i = 0; i < e.length; i++ ) new function(){ var o = e[i]; // Handle event binding jQuery.fn[o] = function(f){ return f ? this.bind(o, f) : this.trigger(o); }; // Handle event unbinding jQuery.fn["un"+o] = function(f){ return this.unbind(o, f); }; // Finally, handle events that only fire once jQuery.fn["one"+o] = function(f){ // Attach the event listener return this.each(function(){ var count = 0; // Add the event jQuery.event.add( this, o, function(e){ // If this function has already been executed, stop if ( count++ ) return true; // And execute the bound function return f.apply(this, [e]); }); }); }; };
return this.each(function(){ var count = 0; jQuery.event.add( this, o, function(e){ if ( count++ ) return true; return f.apply(this, [e]); }); });
return this.bind(o, f, 1);
for ( var i = 0; i < e.length; i++ ) new function(){ var o = e[i]; // Handle event binding jQuery.fn[o] = function(f){ return f ? this.bind(o, f) : this.trigger(o); }; // Handle event unbinding jQuery.fn["un"+o] = function(f){ return this.unbind(o, f); }; // Finally, handle events that only fire once jQuery.fn["one"+o] = function(f){ // Attach the event listener return this.each(function(){ var count = 0; // Add the event jQuery.event.add( this, o, function(e){ // If this function has already been executed, stop if ( count++ ) return true; // And execute the bound function return f.apply(this, [e]); }); }); }; };
.find("div.desc",function(){
.find("div.desc").each(function(){
$("a.name").click(function(){ $("div.more,div.short",this.parentNode.parentNode) .find("div.desc",function(){ $(this).html( $(this).html().replace(/\n\n/g, "<br/><br/>") ); }) .toggle('slow'); return false; });
})
}).end()
$("a.name").click(function(){ $("div.more,div.short",this.parentNode.parentNode) .find("div.desc",function(){ $(this).html( $(this).html().replace(/\n\n/g, "<br/><br/>") ); }) .toggle('slow'); return false; });
$.eval( this.text || this.textContent || this.innerHTML );
$.eval( this.text || this.textContent || this.innerHTML || "");
$.xml(t,a,o,function(h){ h = h.responseText; self.html(h).find("script").each(function(){ try { $.eval( this.text || this.textContent || this.innerHTML ); } catch(e){} }); if(f){f(h);} });
return this.bind(o, function(e){
return this.each(function(){ var count = 0; jQuery.event.add( this, o, function(e){ if ( count++ ) return;
for ( var i = 0; i < e.length; i++ ) new function(){ var o = e[i]; // Handle event binding jQuery.fn[o] = function(f){ return f ? this.bind(o, f) : this.trigger(o); }; // Handle event unbinding jQuery.fn["un"+o] = function(f){ return this.unbind(o, f); }; // Finally, handle events that only fire once jQuery.fn["one"+o] = function(f){ // Attach the event listener return this.bind(o, function(e){ // TODO: Remove the event listener, instead of this hack // If this function has already been executed, stop if ( this[o+f] !== null ) return; // Otherwise, mark as having been executed this[o+f]++; // And execute the bound function return f.apply(this, [e]); }); }; }
if ( this[o+f] !== null ) return; this[o+f]++; return f.apply(this, [e]);
return f.apply(this, [e]); });
for ( var i = 0; i < e.length; i++ ) new function(){ var o = e[i]; // Handle event binding jQuery.fn[o] = function(f){ return f ? this.bind(o, f) : this.trigger(o); }; // Handle event unbinding jQuery.fn["un"+o] = function(f){ return this.unbind(o, f); }; // Finally, handle events that only fire once jQuery.fn["one"+o] = function(f){ // Attach the event listener return this.bind(o, function(e){ // TODO: Remove the event listener, instead of this hack // If this function has already been executed, stop if ( this[o+f] !== null ) return; // Otherwise, mark as having been executed this[o+f]++; // And execute the bound function return f.apply(this, [e]); }); }; }
z.timer = setInterval(function(){ z.step(from, to); }, 13);
return this.each(function(){ if ( !this.queue ) this.queue = {}; if ( !this.queue[type] ) this.queue[type] = []; this.queue[type].push( fn ); if ( this.queue[type].length == 1 ) fn.apply(this); });
z.timer = setInterval(function(){ z.step(from, to); }, 13);
$('*', this).each(function() { if (this.disabled || this.type == 'reset' || (this.type == 'checkbox' && !this.checked) || (this.type == 'radio' && !this.checked)) return; if (this.type == 'submit' || this.type == 'image') { if (this.form.clicked != this) return; if (this.type == 'image') { if (this.form.clicked_x) { a.push({name: this.name+'_x', value: this.form.clicked_x}); a.push({name: this.name+'_y', value: this.form.clicked_y}); return; } } } if (!ok[this.nodeName.toUpperCase()]) return; var par = this.parentNode; var p = par.nodeName.toUpperCase(); if ((p == 'SELECT' || p == 'OPTGROUP') && !this.selected) return; var n = this.name || par.name; if (!n && p == 'OPTGROUP' && (par = par.parentNode)) n = par.name; if (n == undefined) return; a.push({name: n, value: this.value}); });
$('input[@type="submit"],input[@type="image"]', this).click(function(ev){ this.form.clicked = this; if (ev.offsetX != undefined) { this.form.clicked_x = ev.offsetX; this.form.clicked_y = ev.offsetY; } else { this.form.clicked_x = ev.pageX - this.offsetLeft; this.form.clicked_y = ev.pageY - this.offsetTop; } });
$('*', this).each(function() { if (this.disabled || this.type == 'reset' || (this.type == 'checkbox' && !this.checked) || (this.type == 'radio' && !this.checked)) return; if (this.type == 'submit' || this.type == 'image') { if (this.form.clicked != this) return; if (this.type == 'image') { if (this.form.clicked_x) { a.push({name: this.name+'_x', value: this.form.clicked_x}); a.push({name: this.name+'_y', value: this.form.clicked_y}); return; } } } if (!ok[this.nodeName.toUpperCase()]) return; var par = this.parentNode; var p = par.nodeName.toUpperCase(); if ((p == 'SELECT' || p == 'OPTGROUP') && !this.selected) return; var n = this.name || par.name; if (!n && p == 'OPTGROUP' && (par = par.parentNode)) n = par.name; if (n == undefined) return; a.push({name: n, value: this.value}); });
this.each(function(){ if ( !b ) for ( var j in a ) $.attr(this.style,j,a[j]); else $.attr(this.style,a,b); }) : $.css( this.get(0), a );
return this.each(function(){ var d = $.css(this,"display"); if ( d == "none" || d === "" ) $(this).show(); else $(this).hide(); });
this.each(function(){ if ( !b ) for ( var j in a ) $.attr(this.style,j,a[j]); else $.attr(this.style,a,b); }) : $.css( this.get(0), a );
test("$.ajax - xml: non-namespace elements inside namespaced elements", function() { expect(3);
test("$.ajax - simple post", function() { expect(1);
test("$.ajax - xml: non-namespace elements inside namespaced elements", function() { expect(3); stop(); $.ajax({ url: "data/with_fries.xml", dataType: "xml", type: "GET", data: "", success: function(resp) { ok( $("properties", resp).length == 1, 'properties in responseXML' ); ok( $("jsconf", resp).length == 1, 'jsconf in responseXML' ); ok( $("thing", resp).length == 2, 'things in responseXML' ); start(); } });});
url: "data/with_fries.xml", dataType: "xml", type: "GET", data: "", success: function(resp) { ok( $("properties", resp).length == 1, 'properties in responseXML' ); ok( $("jsconf", resp).length == 1, 'jsconf in responseXML' ); ok( $("thing", resp).length == 2, 'things in responseXML' );
type: "POST", url: "data/name.php", data: "name=peter", success: function(msg){ ok( msg == 'pan', 'Check for POST' );
test("$.ajax - xml: non-namespace elements inside namespaced elements", function() { expect(3); stop(); $.ajax({ url: "data/with_fries.xml", dataType: "xml", type: "GET", data: "", success: function(resp) { ok( $("properties", resp).length == 1, 'properties in responseXML' ); ok( $("jsconf", resp).length == 1, 'jsconf in responseXML' ); ok( $("thing", resp).length == 2, 'things in responseXML' ); start(); } });});
function() {return new ActiveXObject('Microsoft.XMLHTTP')},
function() {return new ActiveXObject('Msxml2.XMLHTTP')},
function() {return new ActiveXObject('Microsoft.XMLHTTP')},
function(a){ return a.type == m[2]; }), r );
r = $.map( ret, function(a){ var r = []; var s = $.sibling(a); if ( s.n > 0 ) { for ( var i = s.n; i < s.length; i++ ) { r[r.length] = s[i]; } } return r; });
function(a){ return a.type == m[2]; }), r );
test("filter(String) - execute callback in not-fitting context", function() { expect(1); $("#main > p#ap > a").filter("#foobar",function(){},function(i){ ok( this == q("google","groups", "mark")[i], "Filter elements, else context" ); });
test("$.extend(Object, Object)", function() { expect(2); var settings = { xnumber1: 5, xnumber2: 7, xstring1: "peter", xstring2: "pan" }, options = { xnumber2: 1, xstring2: "x", xxx: "newstring" }, optionsCopy = { xnumber2: 1, xstring2: "x", xxx: "newstring" }, merged = { xnumber1: 5, xnumber2: 1, xstring1: "peter", xstring2: "x", xxx: "newstring" }; jQuery.extend(settings, options); isSet( settings, merged, "Check if extended: settings must be extended" ); isSet ( options, optionsCopy, "Check if not modified: options must not be modified" );
test("filter(String) - execute callback in not-fitting context", function() { expect(1); $("#main > p#ap > a").filter("#foobar",function(){},function(i){ ok( this == q("google","groups", "mark")[i], "Filter elements, else context" ); });});
name = name.replace(/-([a-z])/ig,function(z,b){return b.toUpperCase();});
var newProp = prop.replace(/\-(\w)/g,function(m,c){return c.toUpperCase();});
name = name.replace(/-([a-z])/ig,function(z,b){return b.toUpperCase();});
if (OSC.ws) { OSC.params.local['in_command'] = { value: 'send_all_params' }; OSC.ws.send(JSON.stringify({ parameters: OSC.params.local })); OSC.params.local = {}; }
$(window).resize(function() { // Redraw the grid (it is important to do this before resizing graph holders) OSC.drawGraphGrid(); // Resize the graph holders $('.plot').css($('#graph_grid').css(['height','width'])); // Hide all graphs, they will be shown next time signal data is received $('#graphs .plot').hide(); // Hide offset arrows, trigger level line and arrow $('.y-offset-arrow, #time_offset_arrow, #buf_time_offset, #trig_level_arrow, #trigger_level').hide(); // Reset left position for trigger level arrow, it is added by jQ UI draggable $('#trig_level_arrow').css('left', ''); // Set the resized flag OSC.state.resized = true; }).resize();
a = a.replace(r,function(z,b){return b.toUpperCase();});
var t = jQuery.grep(jQuery.sibling(a),function(b){ return b.nodeName == a.nodeName; });
a = a.replace(r,function(z,b){return b.toUpperCase();});
name = name.replace(/-([a-z])/ig,function(z,b){return b.toUpperCase();});
"~", function(a){ var r = []; var s = jQuery.sibling(a); if ( s.n > 0 ) for ( var i = s.n; i < s.length; i++ ) r.push( s[i] ); return r; }
name = name.replace(/-([a-z])/ig,function(z,b){return b.toUpperCase();});
test("$.ajax - beforeSend", function() { expect(1);
test("$.ajax - dataType html", function() { expect(5);
test("$.ajax - beforeSend", function() { expect(1); stop(); var customHeader = "value"; $.ajax({ url: "data/name.php", data: {'req': true}, beforeSend: function(xml) { xml.setRequestHeader('X-Custom-Header', customHeader); }, success: function(data) { ok( data == customHeader, "check return value, should be the custom header sent" ); start(); } });});
var customHeader = "value";
testFoo = undefined; var verifyEvaluation = function() { ok( foobar == "bar", 'Check if script src was evaluated for datatype html' ); start(); };
test("$.ajax - beforeSend", function() { expect(1); stop(); var customHeader = "value"; $.ajax({ url: "data/name.php", data: {'req': true}, beforeSend: function(xml) { xml.setRequestHeader('X-Custom-Header', customHeader); }, success: function(data) { ok( data == customHeader, "check return value, should be the custom header sent" ); start(); } });});
url: "data/name.php", data: {'req': true}, beforeSend: function(xml) { xml.setRequestHeader('X-Custom-Header', customHeader); }, success: function(data) { ok( data == customHeader, "check return value, should be the custom header sent" ); start(); }
dataType: "html", url: "data/test.html", success: function(data) { ok( data.match(/^html text/), 'Check content for datatype html' ); ok( testFoo == "foo", 'Check if script was evaluated for datatype html' ); setTimeout(verifyEvaluation, 600); }
test("$.ajax - beforeSend", function() { expect(1); stop(); var customHeader = "value"; $.ajax({ url: "data/name.php", data: {'req': true}, beforeSend: function(xml) { xml.setRequestHeader('X-Custom-Header', customHeader); }, success: function(data) { ok( data == customHeader, "check return value, should be the custom header sent" ); start(); } });});
function() {return new XMLHttpRequest()}
function() {return new ActiveXObject('Microsoft.XMLHTTP')},
function() {return new XMLHttpRequest()}
function(a,f) {return jQuery.grep(a,f,true);};
.replace(/-([a-z])/ig,function(z,b){ return b.toUpperCase(); });
function(a,f) {return jQuery.grep(a,f,true);};
a = a.replace(r,function(z,b){return b.toUpperCase();});
function(a){ return a.type == m[2]; }), r );
a = a.replace(r,function(z,b){return b.toUpperCase();});
.replace(/-([a-z])/ig,function(z,b){ return b.toUpperCase(); });
name = name.replace(/-([a-z])/ig,function(z,b){return b.toUpperCase();});
.replace(/-([a-z])/ig,function(z,b){ return b.toUpperCase(); });
$("#main > p#ap > a").filter("#foobar",function(){},function(i){
test("$.extend(Object, Object, Object, Object)", function() { expect(4); var defaults = { xnumber1: 5, xnumber2: 7, xstring1: "peter", xstring2: "pan" }, defaultsCopy = { xnumber1: 5, xnumber2: 7, xstring1: "peter", xstring2: "pan" }, options1 = { xnumber2: 1, xstring2: "x" }, options1Copy = { xnumber2: 1, xstring2: "x" }, options2 = { xstring2: "xx", xxx: "newstringx" }, options2Copy = { xstring2: "xx", xxx: "newstringx" }, merged = { xnumber1: 5, xnumber2: 1, xstring1: "peter", xstring2: "xx", xxx: "newstringx" }; var settings = jQuery.extend({}, defaults, options1, options2); isSet( settings, merged, "Check if extended: settings must be extended" ); isSet ( defaults, defaultsCopy, "Check if not modified: options1 must not be modified" ); isSet ( options1, options1Copy, "Check if not modified: options1 must not be modified" ); isSet ( options2, options2Copy, "Check if not modified: options2 must not be modified" ); });
$("#main > p#ap > a").filter("#foobar",function(){},function(i){
name = name.replace(/-([a-z])/ig,function(z,b){return b.toUpperCase();});
function(a,f) {return jQuery.grep(a,f,true);};
name = name.replace(/-([a-z])/ig,function(z,b){return b.toUpperCase();});
function(a,f) {return jQuery.grep(a,f,true);};
jQuery.swap(elem, { display: 'block' }, function() { ret = document.defaultView.getComputedStyle(this,null).getPropertyValue(prop); });
function(a,f) {return jQuery.grep(a,f,true);};