Fix indentation in /speed and /test dirs, closes gh-780.

This commit is contained in:
Trey Hunner 2012-05-18 13:28:50 -04:00 committed by Dave Methvin
parent c4df0c91be
commit f1dcaad097
18 changed files with 646 additions and 646 deletions

View File

@ -5,11 +5,11 @@ function benchmark(fn, times, name){
e = fn.lastIndexOf('}');
fn = fn.substring(s,e);
return benchmarkString(fn, times, name);
return benchmarkString(fn, times, name);
}
function benchmarkString(fn, times, name) {
var fn = new Function("i", "var t=new Date; while(i--) {" + fn + "}; return new Date - t")(times)
fn.displayName = name || "benchmarked";
return fn;
var fn = new Function("i", "var t=new Date; while(i--) {" + fn + "}; return new Date - t")(times)
fn.displayName = name || "benchmarked";
return fn;
}

View File

@ -1,10 +1,10 @@
.dialog {
margin-bottom: 1em;
}
a.expand {
background: #e3e3e3;
}
.dialog {
margin-bottom: 1em;
}
a.expand {
background: #e3e3e3;
}
div#time-test {
font-family: Arial, Helvetica, sans-serif;
@ -42,14 +42,14 @@
text-align: center;
}
#time-test {
margin: 1em 0;
padding: .5em;
background: #e3e3e3;
}
#time-taken {
font-weight: bold;
}
#time-test {
margin: 1em 0;
padding: .5em;
background: #e3e3e3;
}
#time-taken {
font-weight: bold;
}
span.wins {
color: #330;
@ -62,4 +62,4 @@
div.buttons {
margin-top: 10px;
margin-bottom: 10px;
}
}

View File

@ -1,41 +1,41 @@
jQuery.benchmarker.tests = [
// Selectors from:
// http://ejohn.org/blog/selectors-that-people-actually-use/
/*
// For Amazon.com
"#navAmazonLogo", "#navSwmSkedPop",
".navbar", ".navGreeting",
"div", "table",
"img.navCrossshopTabCap", "span.navGreeting",
"#navbar table", "#navidWelcomeMsg span",
"div#navbar", "ul#navAmazonLogo",
"#navAmazonLogo .navAmazonLogoGatewayPanel", "#navidWelcomeMsg .navGreeting",
".navbar .navAmazonLogoGatewayPanel", ".navbar .navGreeting",
"*",
"#navAmazonLogo li.navAmazonLogoGatewayPanel", "#navidWelcomeMsg span.navGreeting",
"a[name=top]", "form[name=site-search]",
".navbar li", ".navbar span",
"[name=top]", "[name=site-search]",
"ul li", "a img",
"#navbar #navidWelcomeMsg", "#navbar #navSwmDWPop",
"#navbar ul li", "#navbar a img"
*/
// For Yahoo.com
"#page", "#masthead", "#mastheadhd",
".mastheadbd", ".first", ".on",
"div", "li", "a",
"div.mastheadbd", "li.first", "li.on",
"#page div", "#dtba span",
"div#page", "div#masthead",
"#page .mastheadbd", "#page .first",
".outer_search_container .search_container", ".searchbox_container .inputtext",
"*",
"#page div.mastheadbd", "#page li.first",
"input[name=p]", "a[name=marketplace]",
".outer_search_container div", ".searchbox_container span",
"[name=p]", "[name=marketplace]",
"ul li", "form input",
"#page #e2econtent", "#page #e2e"
// Selectors from:
// http://ejohn.org/blog/selectors-that-people-actually-use/
/*
// For Amazon.com
"#navAmazonLogo", "#navSwmSkedPop",
".navbar", ".navGreeting",
"div", "table",
"img.navCrossshopTabCap", "span.navGreeting",
"#navbar table", "#navidWelcomeMsg span",
"div#navbar", "ul#navAmazonLogo",
"#navAmazonLogo .navAmazonLogoGatewayPanel", "#navidWelcomeMsg .navGreeting",
".navbar .navAmazonLogoGatewayPanel", ".navbar .navGreeting",
"*",
"#navAmazonLogo li.navAmazonLogoGatewayPanel", "#navidWelcomeMsg span.navGreeting",
"a[name=top]", "form[name=site-search]",
".navbar li", ".navbar span",
"[name=top]", "[name=site-search]",
"ul li", "a img",
"#navbar #navidWelcomeMsg", "#navbar #navSwmDWPop",
"#navbar ul li", "#navbar a img"
*/
// For Yahoo.com
"#page", "#masthead", "#mastheadhd",
".mastheadbd", ".first", ".on",
"div", "li", "a",
"div.mastheadbd", "li.first", "li.on",
"#page div", "#dtba span",
"div#page", "div#masthead",
"#page .mastheadbd", "#page .first",
".outer_search_container .search_container", ".searchbox_container .inputtext",
"*",
"#page div.mastheadbd", "#page li.first",
"input[name=p]", "a[name=marketplace]",
".outer_search_container div", ".searchbox_container span",
"[name=p]", "[name=marketplace]",
"ul li", "form input",
"#page #e2econtent", "#page #e2e"
];
jQuery.fn.benchmark = function() {
@ -110,7 +110,7 @@
timeArr.push(new Date() - time);
}
var diff = Math.sum(timeArr) - Math.max.apply( Math, timeArr )
- Math.min.apply( Math, timeArr );
- Math.min.apply( Math, timeArr );
try {
var libRes = window[libraries[0]](code);
var jqRes = jQuery(code);

View File

@ -6,34 +6,34 @@
<script src="jquery-basis.js"></script>
<script>var old = jQuery.noConflict(true);</script>
<script src="../dist/jquery.js"></script>
<script>
jQuery(function ready() {
var node = $("#child"), name;
<script>
jQuery(function ready() {
var node = $("#child"), name;
jQuery.each([".zoo", "#zoo", "[data-foo=zoo]", "#nonexistant"], function(i, item) {
jQuery.each([".zoo", "#zoo", "[data-foo=zoo]", "#nonexistant"], function(i, item) {
setTimeout(function(){
name = "closest '" + item + "'";
name = "closest '" + item + "'";
jQuery("#results").append("<li>" + name + "<ul>" +
"<li>new: " + benchmarkString("$('#child').closest('" + item + "')", 2500, name) + "</li>" +
"<li>old: " + benchmarkString("old('#child').closest('" + item + "')", 2500, name) + "</li>"
"<li>new: " + benchmarkString("$('#child').closest('" + item + "')", 2500, name) + "</li>" +
"<li>old: " + benchmarkString("old('#child').closest('" + item + "')", 2500, name) + "</li>"
+ "</ul></li>");
}, 100);
});
});
</script>
});
});
</script>
</head>
<body>
<div>
<p>Hello</p>
<div class="zoo" id="zoo" data-foo="bar">
<div>
<p id="child">lorem ipsum</p>
<p>dolor sit amet</p>
</div>
</div>
</div>
<ul id="results"></ul>
<div>
<p>Hello</p>
<div class="zoo" id="zoo" data-foo="bar">
<div>
<p id="child">lorem ipsum</p>
<p>dolor sit amet</p>
</div>
</div>
</div>
<ul id="results"></ul>
</body>
</html>

View File

@ -6,178 +6,178 @@
<script src="jquery-basis.js"></script>
<script>var old = jQuery.noConflict(true);</script>
<script src="../dist/jquery.js"></script>
<script>
jQuery(function ready() {
var node = $("#child"), name;
<script>
jQuery(function ready() {
var node = $("#child"), name;
jQuery.each([".zoo", "#zoo", "[data-foo=zoo]", "#nonexistant"], function(i, item) {
jQuery.each([".zoo", "#zoo", "[data-foo=zoo]", "#nonexistant"], function(i, item) {
setTimeout(function(){
name = "filter '" + item + "'";
name = "filter '" + item + "'";
jQuery("#results").append("<li>" + name + "<ul>" +
"<li>new: " + benchmarkString("$('div').filter('" + item + "')", 100, name) + "</li>" +
"<li>old: " + benchmarkString("old('div').filter('" + item + "')", 100, name) + "</li>" +
"<li>new: " + benchmarkString("$('div').filter('" + item + "')", 100, name) + "</li>" +
"<li>old: " + benchmarkString("old('div').filter('" + item + "')", 100, name) + "</li>" +
"</ul></li>");
jQuery("#results").append("<li>single " + name + "<ul>" +
"<li>new: " + benchmarkString("$('#nonexistant').filter('" + item + "')", 1000, name) + "</li>" +
"<li>old: " + benchmarkString("old('#nonexistant').filter('" + item + "')", 1000, name) + "</li>" +
"<li>new: " + benchmarkString("$('#nonexistant').filter('" + item + "')", 1000, name) + "</li>" +
"<li>old: " + benchmarkString("old('#nonexistant').filter('" + item + "')", 1000, name) + "</li>" +
"</ul></li>");
}, 100);
});
});
</script>
});
});
</script>
</head>
<body>
<div>
<p>Hello</p>
<div class="zoo" id="nonexistant" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
</div>
<ul id="results"></ul>
<div>
<p>Hello</p>
<div class="zoo" id="nonexistant" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
</div>
<ul id="results"></ul>
</body>
</html>

View File

@ -6,174 +6,174 @@
<script src="jquery-basis.js"></script>
<script>var old = jQuery.noConflict(true);</script>
<script src="../dist/jquery.js"></script>
<script>
jQuery(function ready() {
var node = $("#child"), name;
<script>
jQuery(function ready() {
var node = $("#child"), name;
jQuery.each([".zoo", "#zoo", "[data-foo=zoo]", "#nonexistant"], function(i, item) {
jQuery.each([".zoo", "#zoo", "[data-foo=zoo]", "#nonexistant"], function(i, item) {
setTimeout(function(){
name = "find '" + item + "'";
name = "find '" + item + "'";
jQuery("#results").append("<li>rooted " + name + "<ul>" +
"<li>new: " + benchmarkString("$('body').find('" + item + "')", 250, name) + "</li>" +
"<li>old: " + benchmarkString("old('body').find('" + item + "')", 250, name) + "</li>" +
"<li>new: " + benchmarkString("$('body').find('" + item + "')", 250, name) + "</li>" +
"<li>old: " + benchmarkString("old('body').find('" + item + "')", 250, name) + "</li>" +
"</ul></li>");
}, 100);
});
});
</script>
});
});
</script>
</head>
<body>
<div>
<p>Hello</p>
<div class="zoo" id="nonexistant" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
</div>
<ul id="results"></ul>
<div>
<p>Hello</p>
<div class="zoo" id="nonexistant" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
<div class="zoo" id="zoo" data-foo="bar"><div></div></div>
</div>
<ul id="results"></ul>
</body>
</html>

File diff suppressed because one or more lines are too long

View File

@ -708,7 +708,7 @@ jQuery.extend({
/(opera)(?:.*version)?[ \/]([\w.]+)/.exec( ua ) ||
/(msie) ([\w.]+)/.exec( ua ) ||
!/compatible/.test( ua ) && /(mozilla)(?:.*? rv:([\w.]+))?/.exec( ua ) ||
[];
[];
return { browser: match[1] || "", version: match[2] || "0" };
},

View File

@ -2,10 +2,10 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>CSP Test Page</title>
<script src="data/include_js.php"></script>
<script src="data/include_js.php"></script>
</head>
<body>
<p>CSP Test Page</p>

View File

@ -6,8 +6,8 @@ $etag = md5($ts);
$ifNoneMatch = isset($_SERVER['HTTP_IF_NONE_MATCH']) ? stripslashes($_SERVER['HTTP_IF_NONE_MATCH']) : false;
if ($ifNoneMatch == $etag) {
header('HTTP/1.0 304 Not Modified');
die; // stop processing
header('HTTP/1.0 304 Not Modified');
die; // stop processing
}
header("Etag: " . $etag);

View File

@ -17,7 +17,7 @@ if ( document.attachEvent ) {
jQuery("body").append("<div>modifying DOM</div>");
window.parent.iframeCallback( true );
});
}
}
document.getElementsByTagName("head")[ 0 ].appendChild( el );
el.src = "../include_js.php";
}, 1000 );
@ -28,4 +28,4 @@ if ( document.attachEvent ) {
<!-- long loading iframe -->
<iframe src="longLoad.php?sleep=15&return=false" style="width: 1px; height: 1px"></iframe>
</body>
</html>
</html>

View File

@ -5,8 +5,8 @@ $ts = $_REQUEST['ts'];
$ifModifiedSince = isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) ? stripslashes($_SERVER['HTTP_IF_MODIFIED_SINCE']) : false;
if ($ifModifiedSince == $ts) {
header('HTTP/1.0 304 Not Modified');
die; // stop processing
header('HTTP/1.0 304 Not Modified');
die; // stop processing
}
header("Last-Modified: " . $ts);

View File

@ -1,8 +1,8 @@
<html>
<head>
<title>iframe</title>
</head>
<body>
<div><span>span text</span></div>
</body>
<head>
<title>iframe</title>
</head>
<body>
<div><span>span text</span></div>
</body>
</html>

View File

@ -89,37 +89,37 @@ th, td {
</table>
<p>NOTE: Only IE supports propertychange, beforeactivate, beforedeactivate; buttons do not support change events.</p>
<h2>Submit Tests</h2>
<table>
<h2>Submit Tests</h2>
<table>
<tr>
<td>
Submit each:
</td>
<td>
<form action="" id="text_submit">
<input class='test' type='text' value='Key Return To Submit'/>
</form>
</td>
<td>
<form action="" id="password_submit">
<input class='test' type='password' value=''/>
</form>
</td>
<td>
<form action="" id="submit_submit">
<input type='submit' value="Click Me To Submit" />
</form>
</td>
<td>$(document).bind('submit')</td>
<td>
Submit each:
</td>
<td>
<form action="" id="text_submit">
<input class='test' type='text' value='Key Return To Submit'/>
</form>
</td>
<td>
<form action="" id="password_submit">
<input class='test' type='password' value=''/>
</form>
</td>
<td>
<form action="" id="submit_submit">
<input type='submit' value="Click Me To Submit" />
</form>
</td>
<td>$(document).bind('submit')</td>
</tr>
<tr>
<td>Results:</td>
<td id='textSubmit' class="red">TEXT</td>
<td id='passwordSubmit' class="red">PASSWORD</td>
<td id='submitSubmit' class="red">BUTTON</td>
<td id='boundSubmit' class="red">DOCUMENT</td>
<td>Results:</td>
<td id='textSubmit' class="red">TEXT</td>
<td id='passwordSubmit' class="red">PASSWORD</td>
<td id='submitSubmit' class="red">BUTTON</td>
<td id='boundSubmit' class="red">DOCUMENT</td>
</tr>
</table>
</table>
<form id="autosub"><input type=submit name=subme /></form>

View File

@ -31,64 +31,64 @@ p {
</style>
</head>
<body>
<h2>Hover (mouse{over,out,enter,leave}) Tests</h2>
<h2>Hover (mouse{over,out,enter,leave}) Tests</h2>
<p>Be sure to try moving the mouse out of the browser via the left side on each test.</p>
<div id="wrapper">
<div id="hoverbox" class="hover-box">
<div class="hover-status">
<div class="hover-status">
<button>Activate</button>
.hover() in/out: <span class="ins">0</span> / <span class="outs">0</span>
</div>
<div class="hover-inside">
Mouse over here should NOT trigger the counter.
</div>
<div class="hover-inside">
Mouse over here should NOT trigger the counter.
</div>
</div>
<div id="liveenterbox" class="hover-box">
<div class="hover-status">
<div class="hover-status">
<button>Activate</button>
Live enter/leave: <span class="ins">0</span> / <span class="outs">0</span>
</div>
<div class="hover-inside">
Mouse over here should NOT trigger the counter.
</div>
<div class="hover-inside">
Mouse over here should NOT trigger the counter.
</div>
</div>
<div id="delegateenterbox" class="hover-box">
<div class="hover-status">
<div class="hover-status">
<button>Activate</button>
Delegated enter/leave: <span class="ins">0</span> / <span class="outs">0</span>
</div>
<div class="hover-inside">
Mouse over here should NOT trigger the counter.
</div>
<div class="hover-inside">
Mouse over here should NOT trigger the counter.
</div>
</div>
<div id="overbox" class="hover-box">
<div class="hover-status">
<div class="hover-status">
<button>Activate</button>
Bind over/out: <span class="ins">0</span> / <span class="outs">0</span>
</div>
<div class="hover-inside">
Mouse over here SHOULD trigger the counter.
</div>
<div class="hover-inside">
Mouse over here SHOULD trigger the counter.
</div>
</div>
<div id="liveoverbox" class="hover-box">
<div class="hover-status">
<div class="hover-status">
<button>Activate</button>
Live over/out: <span class="ins">0</span> / <span class="outs">0</span>
</div>
<div class="hover-inside">
Mouse over here SHOULD trigger the counter.
</div>
<div class="hover-inside">
Mouse over here SHOULD trigger the counter.
</div>
</div>
<div id="delegateoverbox" class="hover-box">
<div class="hover-status">
<div class="hover-status">
<button>Activate</button>
Delegated over/out: <span class="ins">0</span> / <span class="outs">0</span>
</div>
<div class="hover-inside">
Mouse over here SHOULD trigger the counter.
</div>
<div class="hover-inside">
Mouse over here SHOULD trigger the counter.
</div>
</div>
</div> <!-- wrapper -->

View File

@ -63,7 +63,7 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>Run jQuery Test Suite Polluted</title>
<style type="text/css">
.otherlibs fieldset {

View File

@ -769,8 +769,8 @@ test("jQuery.ajax() - disabled globals", function() {
success: function(){ ok(true, "success"); },
error: function(){ ok(false, "error"); },
complete: function(){
ok(true, "complete");
setTimeout(function(){ start(); }, 13);
ok(true, "complete");
setTimeout(function(){ start(); }, 13);
}
});
});
@ -779,14 +779,14 @@ test("jQuery.ajax - xml: non-namespace elements inside namespaced elements", fun
expect(3);
stop();
jQuery.ajax({
url: url("data/with_fries.xml"),
dataType: "xml",
success: function(resp) {
equal( jQuery("properties", resp).length, 1, "properties in responseXML" );
equal( jQuery("jsconf", resp).length, 1, "jsconf in responseXML" );
equal( jQuery("thing", resp).length, 2, "things in responseXML" );
start();
}
url: url("data/with_fries.xml"),
dataType: "xml",
success: function(resp) {
equal( jQuery("properties", resp).length, 1, "properties in responseXML" );
equal( jQuery("jsconf", resp).length, 1, "jsconf in responseXML" );
equal( jQuery("thing", resp).length, 2, "things in responseXML" );
start();
}
});
});
@ -794,18 +794,18 @@ test("jQuery.ajax - xml: non-namespace elements inside namespaced elements (over
expect(3);
stop();
jQuery.ajax({
url: url("data/with_fries_over_jsonp.php"),
dataType: "jsonp xml",
success: function(resp) {
equal( jQuery("properties", resp).length, 1, "properties in responseXML" );
equal( jQuery("jsconf", resp).length, 1, "jsconf in responseXML" );
equal( jQuery("thing", resp).length, 2, "things in responseXML" );
start();
},
error: function(_1,_2,error) {
ok( false, error );
start();
}
url: url("data/with_fries_over_jsonp.php"),
dataType: "jsonp xml",
success: function(resp) {
equal( jQuery("properties", resp).length, 1, "properties in responseXML" );
equal( jQuery("jsconf", resp).length, 1, "jsconf in responseXML" );
equal( jQuery("thing", resp).length, 2, "things in responseXML" );
start();
},
error: function(_1,_2,error) {
ok( false, error );
start();
}
});
});
@ -914,13 +914,13 @@ test("jQuery.ajax - dataType html", function() {
};
jQuery.ajax({
dataType: "html",
url: url("data/test.html"),
success: function(data) {
jQuery("#ap").html(data);
ok( data.match(/^html text/), "Check content for datatype html" );
setTimeout(verifyEvaluation, 600);
}
dataType: "html",
url: url("data/test.html"),
success: function(data) {
jQuery("#ap").html(data);
ok( data.match(/^html text/), "Check content for datatype html" );
setTimeout(verifyEvaluation, 600);
}
});
});
@ -953,7 +953,7 @@ test("serialize()", function() {
"action=Test&radio2=on&check=on&hidden=&foo%5Bbar%5D=&name=name&search=search&email=dave%40jquery.com&number=43&select1=&select2=3&select3=1&select3=2&select5=3&T3=%3F%0D%0AZ&H1=x&H2=&PWD=&T1=&T2=YES&My+Name=me&S1=abc&S3=YES&S4=",
"Multiple form serialization as query string");
/* Temporarily disabled. Opera 10 has problems with form serialization.
/* Temporarily disabled. Opera 10 has problems with form serialization.
equal( jQuery("#form, #testForm :input").serialize(),
"action=Test&radio2=on&check=on&hidden=&foo%5Bbar%5D=&name=name&search=search&email=dave%40jquery.com&number=43&select1=&select2=3&select3=1&select3=2&T3=%3F%0D%0AZ&H1=x&H2=&PWD=&T1=&T2=YES&My+Name=me&S1=abc&S3=YES&S4=",
"Mixed form/input serialization as query string");
@ -1741,7 +1741,7 @@ test("jQuery.ajax() - malformed JSON", function() {
error: function(xhr, msg, detailedMsg) {
equal( "parsererror", msg, "A parse error occurred." );
ok( /(invalid|error|exception)/i.test(detailedMsg), "Detailed parsererror message provided" );
start();
start();
}
});
});
@ -1777,12 +1777,12 @@ test("jQuery.ajax() - json by content-type", function() {
url: "data/json.php",
data: { header: "json", json: "array" },
success: function( json ) {
ok( json.length >= 2, "Check length");
equal( json[0].name, "John", "Check JSON: first, name" );
equal( json[0].age, 21, "Check JSON: first, age" );
equal( json[1].name, "Peter", "Check JSON: second, name" );
equal( json[1].age, 25, "Check JSON: second, age" );
start();
ok( json.length >= 2, "Check length");
equal( json[0].name, "John", "Check JSON: first, name" );
equal( json[0].age, 21, "Check JSON: first, age" );
equal( json[1].name, "Peter", "Check JSON: second, name" );
equal( json[1].age, 25, "Check JSON: second, age" );
start();
}
});
});
@ -1801,12 +1801,12 @@ test("jQuery.ajax() - json by content-type disabled with options", function() {
success: function( text ) {
equal( typeof text , "string" , "json wasn't auto-determined" );
var json = jQuery.parseJSON( text );
ok( json.length >= 2, "Check length");
equal( json[0].name, "John", "Check JSON: first, name" );
equal( json[0].age, 21, "Check JSON: first, age" );
equal( json[1].name, "Peter", "Check JSON: second, name" );
equal( json[1].age, 25, "Check JSON: second, age" );
start();
ok( json.length >= 2, "Check length");
equal( json[0].name, "John", "Check JSON: first, name" );
equal( json[0].age, 21, "Check JSON: first, age" );
equal( json[1].name, "Peter", "Check JSON: second, name" );
equal( json[1].age, 25, "Check JSON: second, age" );
start();
}
});
});
@ -1815,12 +1815,12 @@ test("jQuery.getJSON(String, Hash, Function) - JSON array", function() {
expect(5);
stop();
jQuery.getJSON(url("data/json.php"), {json: "array"}, function(json) {
ok( json.length >= 2, "Check length");
equal( json[0].name, "John", "Check JSON: first, name" );
equal( json[0].age, 21, "Check JSON: first, age" );
equal( json[1].name, "Peter", "Check JSON: second, name" );
equal( json[1].age, 25, "Check JSON: second, age" );
start();
ok( json.length >= 2, "Check length");
equal( json[0].name, "John", "Check JSON: first, name" );
equal( json[0].age, 21, "Check JSON: first, age" );
equal( json[1].name, "Peter", "Check JSON: second, name" );
equal( json[1].age, 25, "Check JSON: second, age" );
start();
});
});
@ -1828,11 +1828,11 @@ test("jQuery.getJSON(String, Function) - JSON object", function() {
expect(2);
stop();
jQuery.getJSON(url("data/json.php"), function(json) {
if (json && json.data) {
equal( json.data.lang, "en", "Check JSON: lang" );
equal( json.data.length, 25, "Check JSON: length" );
}
start();
if (json && json.data) {
equal( json.data.lang, "en", "Check JSON: lang" );
equal( json.data.length, 25, "Check JSON: length" );
}
start();
});
});
@ -1862,9 +1862,9 @@ test("jQuery.getJSON(String, Function) - JSON object with absolute url to local
stop();
jQuery.getJSON(url(base + "data/json.php"), function(json) {
equal( json.data.lang, "en", "Check JSON: lang" );
equal( json.data.length, 25, "Check JSON: length" );
start();
equal( json.data.lang, "en", "Check JSON: lang" );
equal( json.data.length, 25, "Check JSON: length" );
start();
});
});
@ -1904,19 +1904,19 @@ test("jQuery.post(String, Hash, Function) - simple with xml", function() {
var done = 0;
jQuery.post(url("data/name.php"), {xml: "5-2"}, function(xml){
jQuery("math", xml).each(function() {
jQuery("math", xml).each(function() {
equal( jQuery("calculation", this).text(), "5-2", "Check for XML" );
equal( jQuery("result", this).text(), "3", "Check for XML" );
});
if ( ++done === 2 ) start();
});
if ( ++done === 2 ) start();
});
jQuery.post(url("data/name.php?xml=5-2"), {}, function(xml){
jQuery("math", xml).each(function() {
jQuery("math", xml).each(function() {
equal( jQuery("calculation", this).text(), "5-2", "Check for XML" );
equal( jQuery("result", this).text(), "3", "Check for XML" );
});
if ( ++done === 2 ) start();
});
if ( ++done === 2 ) start();
});
});
@ -1944,10 +1944,10 @@ test("jQuery.ajaxSetup({timeout: Number}) - with global timeout", function() {
jQuery("#qunit-fixture").ajaxError(pass);
jQuery.ajax({
type: "GET",
url: url("data/name.php?wait=5"),
error: pass,
success: fail
type: "GET",
url: url("data/name.php?wait=5"),
error: pass,
success: fail
});
// reset timeout
@ -1959,17 +1959,17 @@ test("jQuery.ajaxSetup({timeout: Number}) with localtimeout", function() {
jQuery.ajaxSetup({timeout: 50});
jQuery.ajax({
type: "GET",
timeout: 15000,
url: url("data/name.php?wait=1"),
error: function() {
ok( false, "Check for local timeout failed" );
start();
},
success: function() {
ok( true, "Check for local timeout" );
start();
}
type: "GET",
timeout: 15000,
url: url("data/name.php?wait=1"),
error: function() {
ok( false, "Check for local timeout failed" );
start();
},
success: function() {
ok( true, "Check for local timeout" );
start();
}
});
// reset timeout
@ -1980,12 +1980,12 @@ test("jQuery.ajax - simple get", function() {
expect(1);
stop();
jQuery.ajax({
type: "GET",
url: url("data/name.php?name=foo"),
success: function(msg){
equal( msg, "bar", "Check for GET" );
start();
}
type: "GET",
url: url("data/name.php?name=foo"),
success: function(msg){
equal( msg, "bar", "Check for GET" );
start();
}
});
});
@ -1993,13 +1993,13 @@ test("jQuery.ajax - simple post", function() {
expect(1);
stop();
jQuery.ajax({
type: "POST",
url: url("data/name.php"),
data: "name=peter",
success: function(msg){
equal( msg, "pan", "Check for POST" );
start();
}
type: "POST",
url: url("data/name.php"),
data: "name=peter",
success: function(msg){
equal( msg, "pan", "Check for POST" );
start();
}
});
});
@ -2091,7 +2091,7 @@ jQuery.each( { " (cache)": true, " (no cache)": false }, function( label, cache
ok(data == null, "response body should be empty");
}
start();
},
},
error: function() {
// Do this because opera simply refuses to implement 304 handling :(
// A feature-driven way of detecting this would be appreciated
@ -2140,8 +2140,8 @@ jQuery.each( { " (cache)": true, " (no cache)": false }, function( label, cache
ok(data == null, "response body should be empty");
}
start();
},
error: function() {
},
error: function() {
// Do this because opera simply refuses to implement 304 handling :(
// A feature-driven way of detecting this would be appreciated
// See: http://gist.github.com/599419
@ -2476,7 +2476,7 @@ test( "jQuery.domManip - script in comments are properly evaluated (#11402)", fu
});
test("jQuery.ajax - active counter", function() {
ok( jQuery.active == 0, "ajax active counter should be zero: " + jQuery.active );
ok( jQuery.active == 0, "ajax active counter should be zero: " + jQuery.active );
});
}

View File

@ -1064,13 +1064,13 @@ test("jQuery.proxy", function(){
// Make sure it doesn't freak out
equal( jQuery.proxy( null, thisObject ), undefined, "Make sure no function was returned." );
// Partial application
var test2 = function( a ){ equal( a, "pre-applied", "Ensure arguments can be pre-applied." ); };
jQuery.proxy( test2, null, "pre-applied" )();
// Partial application
var test2 = function( a ){ equal( a, "pre-applied", "Ensure arguments can be pre-applied." ); };
jQuery.proxy( test2, null, "pre-applied" )();
// Partial application w/ normal arguments
var test3 = function( a, b ){ equal( b, "normal", "Ensure arguments can be pre-applied and passed as usual." ); };
jQuery.proxy( test3, null, "pre-applied" )( "normal" );
// Partial application w/ normal arguments
var test3 = function( a, b ){ equal( b, "normal", "Ensure arguments can be pre-applied and passed as usual." ); };
jQuery.proxy( test3, null, "pre-applied" )( "normal" );
// Test old syntax
var test4 = { meth: function( a ){ equal( a, "boom", "Ensure old syntax works." ); } };
@ -1137,52 +1137,52 @@ test("jQuery.parseXML", 8, function(){
});
test("jQuery.sub() - Static Methods", function(){
expect(18);
var Subclass = jQuery.sub();
Subclass.extend({
topLevelMethod: function() {return this.debug;},
debug: false,
config: {
locale: "en_US"
},
setup: function(config) {
this.extend(true, this.config, config);
}
});
Subclass.fn.extend({subClassMethod: function() { return this;}});
expect(18);
var Subclass = jQuery.sub();
Subclass.extend({
topLevelMethod: function() {return this.debug;},
debug: false,
config: {
locale: "en_US"
},
setup: function(config) {
this.extend(true, this.config, config);
}
});
Subclass.fn.extend({subClassMethod: function() { return this;}});
//Test Simple Subclass
ok(Subclass.topLevelMethod() === false, "Subclass.topLevelMethod thought debug was true");
ok(Subclass.config.locale == "en_US", Subclass.config.locale + " is wrong!");
deepEqual(Subclass.config.test, undefined, "Subclass.config.test is set incorrectly");
equal(jQuery.ajax, Subclass.ajax, "The subclass failed to get all top level methods");
//Test Simple Subclass
ok(Subclass.topLevelMethod() === false, "Subclass.topLevelMethod thought debug was true");
ok(Subclass.config.locale == "en_US", Subclass.config.locale + " is wrong!");
deepEqual(Subclass.config.test, undefined, "Subclass.config.test is set incorrectly");
equal(jQuery.ajax, Subclass.ajax, "The subclass failed to get all top level methods");
//Create a SubSubclass
var SubSubclass = Subclass.sub();
//Create a SubSubclass
var SubSubclass = Subclass.sub();
//Make Sure the SubSubclass inherited properly
ok(SubSubclass.topLevelMethod() === false, "SubSubclass.topLevelMethod thought debug was true");
ok(SubSubclass.config.locale == "en_US", SubSubclass.config.locale + " is wrong!");
deepEqual(SubSubclass.config.test, undefined, "SubSubclass.config.test is set incorrectly");
equal(jQuery.ajax, SubSubclass.ajax, "The subsubclass failed to get all top level methods");
//Make Sure the SubSubclass inherited properly
ok(SubSubclass.topLevelMethod() === false, "SubSubclass.topLevelMethod thought debug was true");
ok(SubSubclass.config.locale == "en_US", SubSubclass.config.locale + " is wrong!");
deepEqual(SubSubclass.config.test, undefined, "SubSubclass.config.test is set incorrectly");
equal(jQuery.ajax, SubSubclass.ajax, "The subsubclass failed to get all top level methods");
//Modify The Subclass and test the Modifications
SubSubclass.fn.extend({subSubClassMethod: function() { return this;}});
SubSubclass.setup({locale: "es_MX", test: "worked"});
SubSubclass.debug = true;
SubSubclass.ajax = function() {return false;};
ok(SubSubclass.topLevelMethod(), "SubSubclass.topLevelMethod thought debug was false");
deepEqual(SubSubclass(document).subClassMethod, Subclass.fn.subClassMethod, "Methods Differ!");
ok(SubSubclass.config.locale == "es_MX", SubSubclass.config.locale + " is wrong!");
ok(SubSubclass.config.test == "worked", "SubSubclass.config.test is set incorrectly");
notEqual(jQuery.ajax, SubSubclass.ajax, "The subsubclass failed to get all top level methods");
//Modify The Subclass and test the Modifications
SubSubclass.fn.extend({subSubClassMethod: function() { return this;}});
SubSubclass.setup({locale: "es_MX", test: "worked"});
SubSubclass.debug = true;
SubSubclass.ajax = function() {return false;};
ok(SubSubclass.topLevelMethod(), "SubSubclass.topLevelMethod thought debug was false");
deepEqual(SubSubclass(document).subClassMethod, Subclass.fn.subClassMethod, "Methods Differ!");
ok(SubSubclass.config.locale == "es_MX", SubSubclass.config.locale + " is wrong!");
ok(SubSubclass.config.test == "worked", "SubSubclass.config.test is set incorrectly");
notEqual(jQuery.ajax, SubSubclass.ajax, "The subsubclass failed to get all top level methods");
//This shows that the modifications to the SubSubClass did not bubble back up to it's superclass
ok(Subclass.topLevelMethod() === false, "Subclass.topLevelMethod thought debug was true");
ok(Subclass.config.locale == "en_US", Subclass.config.locale + " is wrong!");
deepEqual(Subclass.config.test, undefined, "Subclass.config.test is set incorrectly");
deepEqual(Subclass(document).subSubClassMethod, undefined, "subSubClassMethod set incorrectly");
equal(jQuery.ajax, Subclass.ajax, "The subclass failed to get all top level methods");
//This shows that the modifications to the SubSubClass did not bubble back up to it's superclass
ok(Subclass.topLevelMethod() === false, "Subclass.topLevelMethod thought debug was true");
ok(Subclass.config.locale == "en_US", Subclass.config.locale + " is wrong!");
deepEqual(Subclass.config.test, undefined, "Subclass.config.test is set incorrectly");
deepEqual(Subclass(document).subSubClassMethod, undefined, "subSubClassMethod set incorrectly");
equal(jQuery.ajax, Subclass.ajax, "The subclass failed to get all top level methods");
});
test("jQuery.sub() - .fn Methods", function(){