diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/data/ajax/evalScript.php (renamed from test/data/evalScript.php) | 0 | ||||
-rw-r--r-- | test/data/ajax/method.php | 1 | ||||
-rw-r--r-- | test/unit/ajax.js | 13 |
3 files changed, 13 insertions, 1 deletions
diff --git a/test/data/evalScript.php b/test/data/ajax/evalScript.php index ea9b8c55f..ea9b8c55f 100644 --- a/test/data/evalScript.php +++ b/test/data/ajax/evalScript.php diff --git a/test/data/ajax/method.php b/test/data/ajax/method.php new file mode 100644 index 000000000..d76ff964b --- /dev/null +++ b/test/data/ajax/method.php @@ -0,0 +1 @@ +<?php echo $_SERVER['REQUEST_METHOD'] ?> diff --git a/test/unit/ajax.js b/test/unit/ajax.js index 29a4dfb46..20469d4e7 100644 --- a/test/unit/ajax.js +++ b/test/unit/ajax.js @@ -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 ); }); |