AMD-ify jQuery sourcegit s! Woo! Fixes #14113, #14163.

Conflicts:
	Gruntfile.js
	README.md
	src/ajax.js
	src/ajax/xhr.js
	src/attributes.js
	src/core.js
	src/css.js
	src/data.js
	src/effects.js
	src/event.js
	src/manipulation.js
	src/offset.js
	src/selector-native.js
	src/traversing.js
	test/unit/core.js
	test/unit/data.js
This commit is contained in:
Timmy Willison
2013-08-15 14:15:49 -04:00
parent 144837afdf
commit 217cbb7109
73 changed files with 27840 additions and 1659 deletions

View File

@@ -17,13 +17,6 @@ test("Basic requirements", function() {
ok( $, "$" );
});
testIframeWithCallback( "Conditional compilation compatibility (#13274)", "core/cc_on.html", function( cc_on, errors, $ ) {
expect( 3 );
ok( true, "JScript conditional compilation " + ( cc_on ? "supported" : "not supported" ) );
deepEqual( errors, [], "No errors" );
ok( $(), "jQuery executes" );
});
test("jQuery()", function() {
var elem, i,
@@ -1358,3 +1351,10 @@ test("jQuery.camelCase()", function() {
equal( jQuery.camelCase( key ), val, "Converts: " + key + " => " + val );
});
});
testIframeWithCallback( "Conditional compilation compatibility (#13274)", "core/cc_on.html", function( cc_on, errors, $ ) {
expect( 3 );
ok( true, "JScript conditional compilation " + ( cc_on ? "supported" : "not supported" ) );
deepEqual( errors, [], "No errors" );
ok( $(), "jQuery executes" );
});

View File

@@ -6,7 +6,7 @@ test("expando", function(){
equal(jQuery.expando !== undefined, true, "jQuery is exposing the expando");
});
function dataTests (elem) {
function dataTests( elem ) {
var dataObj, internalDataObj;
equal( jQuery.data(elem, "foo"), undefined, "No data exists initially" );
@@ -73,30 +73,30 @@ function dataTests (elem) {
test("jQuery.data(div)", 25, function() {
var div = document.createElement("div");
dataTests(div);
dataTests( div );
// We stored one key in the private data
// assert that nothing else was put in there, and that that
// one stayed there.
QUnit.expectJqData(div, "foo");
QUnit.expectJqData( div, "foo" );
});
test("jQuery.data({})", 25, function() {
dataTests({});
dataTests( {} );
});
test("jQuery.data(window)", 25, function() {
// remove bound handlers from window object to stop potential false positives caused by fix for #5280 in
// transports/xhr.js
jQuery(window).off("unload");
jQuery( window ).off( "unload" );
dataTests(window);
dataTests( window );
});
test("jQuery.data(document)", 25, function() {
dataTests(document);
dataTests( document );
QUnit.expectJqData(document, "foo");
QUnit.expectJqData( document, "foo" );
});
test("Expando cleanup", 4, function() {

View File

@@ -12,13 +12,18 @@ test( "zoom of doom (#13089)", function() {
if ( jQuery.css ) {
testIframeWithCallback( "body background is not lost if set prior to loading jQuery (#9239)", "support/bodyBackground.html", function( color, support ) {
expect( 2 );
var okValue = {
"#000000": true,
"rgb(0, 0, 0)": true
};
var okValue = {
"#000000": true,
"rgb(0, 0, 0)": true
};
ok( okValue[ color ], "color was not reset (" + color + ")" );
deepEqual( jQuery.extend( {}, support ), jQuery.support, "Same support properties" );
stop();
// Run doc ready tests as well
jQuery(function() {
deepEqual( jQuery.extend( {}, support ), jQuery.support, "Same support properties" );
start();
});
});
}