Merge branch 'master' of git://github.com/jquery/jquery into 2773_find_closest
This commit is contained in:
commit
eb1497c1fb
9 changed files with 42 additions and 39 deletions
1
test/qunit
Submodule
1
test/qunit
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit d404faf8f587fcbe6b8907943022e6318dd51e0c
|
|
@ -492,7 +492,7 @@ test(".ajax() - hash", function() {
|
|||
|
||||
test("jQuery ajax - cross-domain detection", function() {
|
||||
|
||||
expect( 5 );
|
||||
expect( 6 );
|
||||
|
||||
var loc = document.location,
|
||||
otherPort = loc.port === 666 ? 667 : 666,
|
||||
|
@ -508,6 +508,7 @@ test("jQuery ajax - cross-domain detection", function() {
|
|||
});
|
||||
|
||||
jQuery.ajax({
|
||||
dataType: "jsonp",
|
||||
url: 'app:/path',
|
||||
beforeSend: function( _ , s ) {
|
||||
ok( s.crossDomain , "Adobe AIR app:/ URL detected as cross-domain" );
|
||||
|
@ -533,6 +534,15 @@ test("jQuery ajax - cross-domain detection", function() {
|
|||
}
|
||||
});
|
||||
|
||||
jQuery.ajax({
|
||||
dataType: "jsonp",
|
||||
url: "about:blank",
|
||||
beforeSend: function( _ , s ) {
|
||||
ok( s.crossDomain , "Test about:blank is detected as cross-domain" );
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
jQuery.ajax({
|
||||
dataType: "jsonp",
|
||||
url: loc.protocol + "//" + loc.host,
|
||||
|
|
|
@ -739,7 +739,7 @@ test("insertAfter(String|Element|Array<Element>|jQuery)", function() {
|
|||
});
|
||||
|
||||
var testReplaceWith = function(val) {
|
||||
expect(20);
|
||||
expect(21);
|
||||
jQuery('#yahoo').replaceWith(val( '<b id="replace">buga</b>' ));
|
||||
ok( jQuery("#replace")[0], 'Replace element with string' );
|
||||
ok( !jQuery("#yahoo")[0], 'Verify that original element is gone, after string' );
|
||||
|
@ -800,6 +800,9 @@ var testReplaceWith = function(val) {
|
|||
equals( set[0].nodeName.toLowerCase(), "span", "Replace the disconnected node." );
|
||||
equals( set.length, 1, "Replace the disconnected node." );
|
||||
|
||||
var non_existant = jQuery('#does-not-exist').replaceWith( val("<b>should not throw an error</b>") );
|
||||
equals( non_existant.length, 0, "Length of non existant element." );
|
||||
|
||||
var $div = jQuery("<div class='replacewith'></div>").appendTo("body");
|
||||
// TODO: Work on jQuery(...) inline script execution
|
||||
//$div.replaceWith("<div class='replacewith'></div><script>" +
|
||||
|
@ -827,7 +830,7 @@ test("replaceWith(String|Element|Array<Element>|jQuery)", function() {
|
|||
test("replaceWith(Function)", function() {
|
||||
testReplaceWith(functionReturningObj);
|
||||
|
||||
expect(21);
|
||||
expect(22);
|
||||
|
||||
var y = jQuery("#yahoo")[0];
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue