mirror of
https://github.com/jquery/jquery.git
synced 2026-04-20 03:01:22 -04:00
Ajax: make jQuery#load "type" field explicit
* Move "evalScript.php" file to appropriate place
* Make jQuery#load "type" field explicit and add test for it
Ref trac-11264
Ref 4ef120d3f2
This commit is contained in:
1
test/data/ajax/method.php
Normal file
1
test/data/ajax/method.php
Normal file
@@ -0,0 +1 @@
|
||||
<?php echo $_SERVER['REQUEST_METHOD'] ?>
|
||||
@@ -1689,11 +1689,22 @@ module( "ajax", {
|
||||
ok( false, "Global event triggered" );
|
||||
});
|
||||
|
||||
jQuery("#qunit-fixture").append("<script src='data/evalScript.php'></script>");
|
||||
jQuery("#qunit-fixture").append("<script src='data/ajax/evalScript.php'></script>");
|
||||
|
||||
jQuery( document ).off("ajaxStart ajaxStop");
|
||||
});
|
||||
|
||||
asyncTest( "jQuery#load() - always use GET method even if it overrided through ajaxSetup (#11264)", 1, function() {
|
||||
jQuery.ajaxSetup({
|
||||
type: "POST"
|
||||
});
|
||||
|
||||
jQuery( "#qunit-fixture" ).load( "data/ajax/method.php", function( method ) {
|
||||
equal( method, "GET" );
|
||||
start();
|
||||
});
|
||||
});
|
||||
|
||||
asyncTest( "#11402 - jQuery.domManip() - script in comments are properly evaluated", 2, function() {
|
||||
jQuery("#qunit-fixture").load( "data/cleanScript.html", start );
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user