Skip to content
Browse files

Organizes the php scripts used for testing better, so that the whole …

…logic of a unit, server-side and client-side, is contained within the unit itself. Nearly all ajax unit tests take advantage of the new 'framework'. Lots of files got deleted because they became redundant or weren't used anymore.
  • Loading branch information...
1 parent b7ece8c commit 5824b13ad3883a697fc08524734ec04cabffc9ce @jaubourg jaubourg committed Dec 4, 2012
View
6 test/.jshintrc
@@ -41,11 +41,15 @@
"ajaxTest": true,
"testIframe": true,
"testIframeWithCallback": true,
+ "createComplexHTML": true,
"createDashboardXML": true,
+ "createWithFriesXML": true,
"createXMLFragment": true,
"moduleTeardown": true,
+ "testBar": true,
"testFoo": true,
- "url": true,
+ "url": true,
+ "service": true,
"t": true,
"q": true,
"amdDefined": true,
View
43 test/data/ajax/echo/index.php
@@ -0,0 +1,43 @@
+<?php
+
+ $requestArray = "REQUEST";
+
+ if ( isset( $_REQUEST["requestArray"] ) ) {
+ $requestArray = $_REQUEST["requestArray"];
+ }
+
+ $requestArray =& ${"_$requestArray"};
+
+ $response = array(
+ "status" => "200",
+ "statusText" => "",
+ "contentType" => "text/plain",
+ "content" => "",
+ "callback" => "",
+ "delay" => 0
+ );
+
+ foreach( $response as $field => &$value ) {
+ if ( isset( $requestArray[ $field ] ) ) {
+ $value = $requestArray[ $field ];
+ }
+ }
+
+ if ( is_array( $response["content"] ) ) {
+ $response["content"] = http_build_query( $response["content"] );
+ }
+
+ if ( !$response["callback"] && preg_match( '/index.php\/([^\/\?&]+)/', $_SERVER["REQUEST_URI"], $match ) ) {
+ $response["callback"] = $match[ 1 ];
+ }
+
+ header("HTTP/1.1 $response[status] $response[statusText]");
+ header("Content-Type: $response[contentType]");
+
+ if ( $response["delay"] ) {
+ sleep( $response["delay"] );
+ }
+
+ echo $response["callback"]
+ ? "$response[callback](" . json_encode("$response[content]") . ");"
+ : "$response[content]";
View
30 test/data/ajax/headers/cache/index.php
@@ -0,0 +1,30 @@
+<?php
+$headers = array(
+
+ "If-Modified-Since" => array(
+ "request" => "HTTP_IF_MODIFIED_SINCE",
+ "response" => "Last-Modified",
+ ),
+ "If-None-Match" => array(
+ "request" => "HTTP_IF_NONE_MATCH",
+ "response" => "Etag",
+ ),
+
+);
+
+$header = $_REQUEST["header"];
+$value = $_REQUEST["value"];
+
+if ( $header === "If-None-Match" ) {
+ $value = md5( $value );
+}
+
+$headers = $headers[ $header ];
+
+$requestHeader = isset( $_SERVER[ $headers["request"] ] ) ? stripslashes($_SERVER[ $headers["request"] ]) : false;
+if ( $requestHeader === $value ) {
+ header("HTTP/1.0 304 Not Modified");
+} else {
+ header("$headers[response]: $value");
+ echo $requestHeader ? "OK: $value": "FAIL";
+}
View
12 test/data/ajax/headers/request/index.php
@@ -0,0 +1,12 @@
+<?php
+
+$headers = array();
+
+foreach( $_SERVER as $key => $value ) {
+ $key = str_replace( "_" , "-" , substr($key,0,5) == "HTTP_" ? substr($key,5) : $key );
+ $headers[ $key ] = $value;
+}
+
+foreach( explode( "," , $_GET["headers"] ) as $key ) {
+ echo "$key: " . @$headers[ strtoupper( $key ) ] . "\n";
+}
View
5 test/data/ajax/headers/response/index.php
@@ -0,0 +1,5 @@
+<?php
+
+foreach( $_REQUEST as $header => $value ) {
+ @header("$header: $value");
+}
View
4 test/data/atom+xml.php
@@ -1,4 +0,0 @@
-<?php header("Content-type: atom+xml") ?>
-<root>
- <element />
-</root>
View
1 test/data/badcall.js
@@ -1 +0,0 @@
-undefined();
View
1 test/data/badjson.js
@@ -1 +0,0 @@
-{bad: toTheBone}
View
10 test/data/cleanScript.html
@@ -1,10 +0,0 @@
-<script>
-<!--
-ok( true, "script within html comments executed" );
--->
-</script>
-<script>
-<![CDATA[
-ok( true, "script within CDATA executed" );
-]]>
-</script>
View
11 test/data/dashboard.xml
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<dashboard>
- <locations class="foo">
- <location for="bar" checked="different">
- <infowindowtab>
- <tab title="Location"><![CDATA[blabla]]></tab>
- <tab title="Users"><![CDATA[blublu]]></tab>
- </infowindowtab>
- </location>
- </locations>
-</dashboard>
View
1 test/data/echoData.php
@@ -1 +0,0 @@
-<?php echo file_get_contents('php://input'); ?>
View
1 test/data/echoQuery.php
@@ -1 +0,0 @@
-<?php echo $_SERVER['QUERY_STRING']; ?>
View
5 test/data/errorWithText.php
@@ -1,5 +0,0 @@
-<?php
-
-header("HTTP/1.0 400 Bad Request");
-
-echo "plain text message";
View
21 test/data/etag.php
@@ -1,21 +0,0 @@
-<?php
-error_reporting(0);
-
-$ts = $_REQUEST['ts'];
-$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("Etag: " . $etag);
-
-if ( $ifNoneMatch ) {
- echo "OK: " . $etag;
-} else {
- echo "FAIL";
-}
-
-?>
View
1 test/data/evalScript.php
@@ -1 +0,0 @@
-ok( "<?php echo $_SERVER['REQUEST_METHOD'] ?>" === "GET", "request method is <?php echo $_SERVER['REQUEST_METHOD'] ?>" );
View
18 test/data/headers.php
@@ -1,18 +0,0 @@
-<?php
-
-header( "Sample-Header: Hello World" );
-header( "Empty-Header: " );
-header( "Sample-Header2: Hello World 2" );
-
-$headers = array();
-
-foreach( $_SERVER as $key => $value ) {
-
- $key = str_replace( "_" , "-" , substr( $key , 0 , 5 ) == "HTTP_" ? substr( $key , 5 ) : $key );
- $headers[ $key ] = $value;
-
-}
-
-foreach( explode( "_" , $_GET[ "keys" ] ) as $key ) {
- echo "$key: " . @$headers[ strtoupper( $key ) ] . "\n";
-}
View
20 test/data/if_modified_since.php
@@ -1,20 +0,0 @@
-<?php
-error_reporting(0);
-
-$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("Last-Modified: " . $ts);
-
-if ( $ifModifiedSince ) {
- echo "OK: " . $ts;
-} else {
- echo "FAIL";
-}
-
-?>
View
13 test/data/json.php
@@ -1,13 +0,0 @@
-<?php
-error_reporting(0);
-if ( $_REQUEST['header'] ) {
- header("Content-type: application/json");
-}
-
-$json = $_REQUEST['json'];
-if($json) {
- echo '[ {"name": "John", "age": 21}, {"name": "Peter", "age": 25 } ]';
-} else {
- echo '{ "data": {"lang": "en", "length": 25} }';
-}
-?>
View
1 test/data/json_obj.js
@@ -1 +0,0 @@
-{ "data": {"lang": "en", "length": 25} }
View
14 test/data/jsonp.php
@@ -1,14 +0,0 @@
-<?php
-error_reporting(0);
-$callback = $_REQUEST['callback'];
-if ( ! $callback ) {
- $callback = explode("?",end(explode("/",$_SERVER['REQUEST_URI'])));
- $callback = $callback[0];
-}
-$json = $_REQUEST['json'];
-if($json) {
- echo $callback . '([ {"name": "John", "age": 21}, {"name": "Peter", "age": 25 } ])';
-} else {
- echo $callback . '({ "data": {"lang": "en", "length": 25} })';
-}
-?>
View
1 test/data/name.html
@@ -1 +0,0 @@
-ERROR <script type="text/javascript">ok( true, "name.html retrieved" );</script>
View
24 test/data/name.php
@@ -1,24 +0,0 @@
-<?php
-error_reporting(0);
-$wait = $_REQUEST['wait'];
-if($wait) {
- sleep($wait);
-}
-$xml = $_REQUEST['xml'];
-if($xml) {
- header("Content-type: text/xml");
- $result = ($xml == "5-2") ? "3" : "?";
- echo "<math><calculation>$xml</calculation><result>$result</result></math>";
- die();
-}
-$name = $_REQUEST['name'];
-if($name == 'foo') {
- echo "bar";
- die();
-} else if($name == 'peter') {
- echo "pan";
- die();
-}
-
-echo 'ERROR <script type="text/javascript">ok( true, "name.php executed" );</script>';
-?>
View
12 test/data/params_html.php
@@ -1,12 +0,0 @@
-<div id="post">
-<?php
- foreach( $_POST as $key=>$value )
- echo "<b id='$key'>$value</b>";
-?>
-</div>
-<div id="get">
-<?php
- foreach( $_GET as $key=>$value )
- echo "<b id='$key'>$value</b>";
-?>
-</div>
View
11 test/data/script.php
@@ -1,11 +0,0 @@
-<?php
-error_reporting(0);
-if ( $_REQUEST['header'] ) {
- if ( $_REQUEST['header'] == "ecma" ) {
- header("Content-type: application/ecmascript");
- } else {
- header("Content-type: text/javascript");
- }
-}
-?>
-ok( true, "Script executed correctly." );
View
5 test/data/statusText.php
@@ -1,5 +0,0 @@
-<?php
-
-header( "HTTP/1.0 $_GET[status] $_GET[text]" );
-
-?>
View
7 test/data/test.html
@@ -1,7 +0,0 @@
-html text<br/>
-<script type="text/javascript">/* <![CDATA[ */
-testFoo = "foo"; jQuery('#foo').html('foo');
-ok( true, "test.html executed" );
-/* ]]> */</script>
-<script src="data/test.js"></script>
-blabla
View
3 test/data/test.js
@@ -1,3 +0,0 @@
-var testBar = "bar";
-jQuery('#ap').html('bar');
-ok( true, "test.js executed");
View
7 test/data/test.php
@@ -1,7 +0,0 @@
-html text<br/>
-<script type="text/javascript">/* <![CDATA[ */
-testFoo = "foo"; jQuery('#foo').html('foo');
-ok( true, "test.php executed" );
-/* ]]> */</script>
-<script src="data/test.js?<?php srand(); echo time() . '' . rand(); ?>"></script>
-blabla
View
5 test/data/test2.html
@@ -1,5 +0,0 @@
-<script type="text/javascript">
-var testFoo = "foo";
-jQuery('#foo').html('foo');
-ok( true, "test2.html executed" );
-</script>
View
3 test/data/test3.html
@@ -1,3 +0,0 @@
-<div class="user">This is a user</div>
-<div class="user">This is a user</div>
-<div class="teacher">This is a teacher</div>
View
46 test/data/testinit.js
@@ -58,7 +58,21 @@ function t( a, b, c ) {
deepEqual(f, q.apply( q, c ), a + " (" + b + ")");
}
-function createDashboardXML() {
+function createComplexHTML() {
+ return 'html text<br/> \
+ <script type="text/javascript">/* <![CDATA[ */ \
+ testFoo = "foo"; jQuery("#foo").html("foo"); \
+ ok( true, "inline script executed" ); \
+ /* ]]> */</script> \
+ <script src="' + service("echo", {
+ content: 'var testBar = "bar"; \
+ jQuery("#ap").html("bar"); \
+ ok( true, "remote script executed");'
+ }) + '"></script> \
+ blabla';
+}
+
+function createDashboardXML( noParse ) {
var string = '<?xml version="1.0" encoding="UTF-8"?> \
<dashboard> \
<locations class="foo"> \
@@ -71,10 +85,10 @@ function createDashboardXML() {
</locations> \
</dashboard>';
- return jQuery.parseXML(string);
+ return noParse ? string : jQuery.parseXML(string);
}
-function createWithFriesXML() {
+function createWithFriesXML( noParse ) {
var string = '<?xml version="1.0" encoding="UTF-8"?> \
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" \
xmlns:xsd="http://www.w3.org/2001/XMLSchema" \
@@ -99,9 +113,9 @@ function createWithFriesXML() {
</response> \
</jsconf> \
</soap:Body> \
- </soap:Envelope>';
+ </soap:Envelope>'.replace( /\{\{\s*externalHost\s*\}\}/g, externalHost );
- return jQuery.parseXML( string.replace( /\{\{\s*externalHost\s*\}\}/g, externalHost ) );
+ return noParse ? string : jQuery.parseXML( string );
}
function createXMLFragment() {
@@ -133,16 +147,27 @@ fireNative = document.createEvent ?
/**
* Add random number to url to stop caching
*
- * @example url("data/test.html")
- * @result "data/test.html?10538358428943"
+ * @example url("data/iframe.html")
+ * @result "data/iframe.html?10538358428943"
*
- * @example url("data/test.php?foo=bar")
- * @result "data/test.php?foo=bar&10538358345554"
+ * @example url("data/ajax/echo?foo=bar")
+ * @result "data/ajax/echo?foo=bar&10538358345554"
*/
function url( value ) {
return value + (/\?/.test(value) ? "&" : "?") + new Date().getTime() + "" + parseInt(Math.random() * 100000, 10);
}
+function service( value, data ) {
+ var fragment = url( "data/ajax/" + ( value || "" ) );
+ if ( data ) {
+ if ( typeof data !== "string" ) {
+ data = jQuery.param( data );
+ }
+ fragment += "&" + data;
+ }
+ return fragment;
+}
+
// Ajax testing helper
function ajaxTest( title, expect, options ) {
var requestOptions;
@@ -167,8 +192,9 @@ function ajaxTest( title, expect, options ) {
delete ajaxTest.abort;
if ( options.teardown ) {
options.teardown();
+ } else {
+ start();
}
- start();
}
},
requests = jQuery.map( requestOptions, function( options ) {
View
12 test/data/text.php
@@ -1,12 +0,0 @@
-Lorem ipsum dolor sit amet
-consectetuer adipiscing elit
-Sed lorem leo
-lorem leo consectetuer adipiscing elit
-Sed lorem leo
-rhoncus sit amet
-elementum at
-bibendum at, eros
-Cras at mi et tortor egestas vestibulum
-sed Cras at mi vestibulum
-Phasellus sed felis sit amet
-orci dapibus semper.
View
272 test/data/ua.txt
@@ -1,272 +0,0 @@
-msie 6.0 Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; http://www.Abolimba.de)
-msie 6.0 Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; JyxoToolbar1.0; http://www.Abolimba.de; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 1.1.4322)
- 0 Mozilla/5.0 (compatible; ABrowse 0.4; Syllable)
-webkit 420 Mozilla/5.0 (compatible; U; ABrowse 0.6; Syllable) AppleWebKit/420+ (KHTML, like Gecko)
-msie 7.0 Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Acoo Browser; InfoPath.2; .NET CLR 2.0.50727; Alexa Toolbar)
-msie 6.0 Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Acoo Browser; .NET CLR 1.1.4322; .NET CLR 2.0.50727)
-msie 7.0 Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; Acoo Browser; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.0.04506)
- 0 amaya/9.52 libwww/5.4.0
- 0 amaya/11.1 libwww/5.4.0
- 0 Amiga-AWeb/3.5.07 beta
- 0 AmigaVoyager/3.4.4 (MorphOS/PPC native)
- 0 AmigaVoyager/2.95 (compatible; MC680x0; AmigaOS)
-msie 7.0 Mozilla/4.0 (compatible; MSIE 7.0; AOL 7.0; Windows NT 5.1; FunWebProducts)
-msie 6.0 Mozilla/4.0 (compatible; MSIE 6.0; AOL 8.0; Windows NT 5.1; SV1)
-msie 7.0 Mozilla/4.0 (compatible; MSIE 7.0; AOL 9.0; Windows NT 5.1; .NET CLR 1.1.4322; Zango 10.1.181.0)
-msie 6.0 Mozilla/4.0 (compatible; MSIE 6.0; AOL 6.0; Windows NT 5.1)
-msie 7.0 Mozilla/4.0 (compatible; MSIE 7.0; AOL 9.5; AOLBuild 4337.35; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)
-webkit 523.15 Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN) AppleWebKit/523.15 (KHTML, like Gecko, Safari/419.3) Arora/0.3 (Change: 287 c9dfb30)
-webkit 527 Mozilla/5.0 (X11; U; Linux; en-US) AppleWebKit/527+ (KHTML, like Gecko, Safari/419.3) Arora/0.6
-webkit 523.15 Mozilla/5.0 (X11; U; Linux; C -) AppleWebKit/523.15 (KHTML, like Gecko, Safari/419.3) Arora/0.5
-msie 6.0 Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Avant Browser; Avant Browser; .NET CLR 1.1.4322; .NET CLR 2.0.50727; InfoPath.1)
- 0 Avant Browser (http://www.avantbrowser.com)
-msie 6.0 Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; JyxoToolbar1.0; Embedded Web Browser from: http://bsalsa.com/; Avant Browser; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 1.1.4322)
-msie 7.0 Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; GTB5; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; Avant Browser)
-mozilla 0 Mozilla/5.0 (Windows; U; Win9x; en; Stable) Gecko/20020911 Beonex/0.8.1-stable
-mozilla 0 Mozilla/5.0 (Windows; U; WinNT; en; Preview) Gecko/20020603 Beonex/0.8-stable
-mozilla 1.0.2 Mozilla/5.0 (Windows; U; WinNT; en; rv:1.0.2) Gecko/20030311 Beonex/0.8.2-stable
-mozilla 1.9 Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9) Gecko/2008120120 Blackbird/0.9991
-webkit 527 Mozilla/5.0 (X11; 78; CentOS; US-en) AppleWebKit/527+ (KHTML, like Gecko) Bolt/0.862 Version/3.0 Safari/523.15
-msie 6.0 Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Browzar)
- 0 Bunjalloo/0.7.4(Nintendo DS;U;en)
- 0 Bunjalloo/0.7.6(Nintendo DS;U;en)
-mozilla 1.8.1.4pre Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en; rv:1.8.1.4pre) Gecko/20070511 Camino/1.6pre
-mozilla 1.7.2 Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.2) Gecko/20040825 Camino/0.8.1
-mozilla 1.8.1.12 Mozilla/5.0 (Macintosh; U; Intel Mac OS X Mach-O; en; rv:1.8.1.12) Gecko/20080206 Camino/1.5.5
-mozilla 1.0.1 Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.0.1) Gecko/20030111 Chimera/0.6
-mozilla 1.8.0.10 Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8.0.10) Gecko/20070228 Camino/1.0.4
-webkit 418.9 Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/418.9 (KHTML, like Gecko, Safari) Safari/419.3 Cheshire/1.0.ALPHA
-webkit 419 Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/419 (KHTML, like Gecko, Safari/419.3) Cheshire/1.0.ALPHA
-chrome 1.0.154.36 Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/525.19 (KHTML, like Gecko) Chrome/1.0.154.36 Safari/525.19
-chrome 1.0.154.53 Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/525.19 (KHTML, like Gecko) Chrome/1.0.154.53 Safari/525.19
-mozilla 1.9.0.10 Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.10) Gecko/2009042815 Firefox/3.0.10 CometBird/3.0.10
-mozilla 1.9.0.5 Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.0.5) Gecko/2009011615 Firefox/3.0.5 CometBird/3.0.5
-msie 7.0 Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; Crazy Browser 3.0.0 Beta2)
-msie 6.0 Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; Crazy Browser 2.0.1)
-msie 6.0 Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Crazy Browser 1.0.5; .NET CLR 1.1.4322; InfoPath.1)
-msie 6.0 Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Deepnet Explorer 1.5.0; .NET CLR 1.0.3705)
-webkit 525.27.1 Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_6; en-us) AppleWebKit/525.27.1 (KHTML, like Gecko) Demeter/1.0.9 Safari/125
-webkit 312.8 Mozilla/5.0 (Macintosh; U; PPC Mac OS X; pl-pl) AppleWebKit/312.8 (KHTML, like Gecko, Safari) DeskBrowse/1.0
- 0 Dillo/0.8.5
- 0 Dillo/2.0
- 0 DocZilla/1.0 (Windows; U; WinNT4.0; en-US; rv:1.0.0) Gecko/20020804
- 0 DocZilla/2.7 (Windows; U; Windows NT 5.1; en-US; rv:2.7.0) Gecko/20050706 CiTEC Information
-webkit 527 Mozilla/5.0 (Windows; U; Windows NT 5.1; cs-CZ) AppleWebKit/527+ (KHTML, like Gecko, Safari/419.3) Dooble
- 0 Doris/1.15 [en] (Symbian)
- 0 edbrowse/1.5.17-2
- 0 edbrowse/2.2.10
- 0 edbrowse/3.1.2-1
- 0 ELinks/0.13.GIT (textmode; Linux 2.6.22-2-686 i686; 148x68-3)
- 0 ELinks/0.9.3 (textmode; Linux 2.6.11 i686; 79x24)
- 0 Enigma Browser
-mozilla 1.8.1.12 Mozilla/5.0 (X11; U; Linux i686; en; rv:1.8.1.12) Gecko/20080208 (Debian-1.8.1.12-2) Epiphany/2.20
-mozilla 1.9.0.12 Mozilla/5.0 (X11; U; Linux x86_64; en; rv:1.9.0.12) Gecko/20080528 Fedora/2.24.3-8.fc10 Epiphany/2.22 Firefox/3.0
-mozilla 1.7.3 Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041007 Epiphany/1.4.7
-mozilla 1.5 Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.5) Gecko/20031007 Firebird/0.7
-mozilla 1.5 Mozilla/5.0 (Windows; U; Win95; en-US; rv:1.5) Gecko/20031007 Firebird/0.7
-mozilla 1.8.0.3 Mozilla/5.0 (Windows; U; Windows NT 5.0; es-ES; rv:1.8.0.3) Gecko/20060426 Firefox/1.5.0.3
-mozilla 1.9.1b2 Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; ko; rv:1.9.1b2) Gecko/20081201 Firefox/3.1b2
-mozilla 1.9.0.8 Mozilla/5.0 (Windows; U; Windows NT 5.1; cs; rv:1.9.0.8) Gecko/2009032609 Firefox/3.0.8
-mozilla 1.7.9 Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.7.9) Gecko/20050711 Firefox/1.0.5
-mozilla 1.9b5 Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.9b5) Gecko/2008032620 Firefox/3.0b5
-mozilla 1.8.0.5 Mozilla/5.0 (X11; U; OpenBSD i386; en-US; rv:1.8.0.5) Gecko/20060819 Firefox/1.5.0.5
-mozilla 1.9.1b3 Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1b3) Gecko/20090305 Firefox/3.1b3 GTB5
-mozilla 1.8.1.12 Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.1.12) Gecko/20080214 Firefox/2.0.0.12
-mozilla 1.8.1.9 Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.9) Gecko/20071113 BonEcho/2.0.0.9
-mozilla 1.8.1 Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1) Gecko/20061026 BonEcho/2.0
-mozilla 1.8.1.21pre Mozilla/5.0 (BeOS; U; Haiku BePC; en-US; rv:1.8.1.21pre) Gecko/20090227 BonEcho/2.0.0.21pre
-mozilla 1.9.0.8 Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.8) Gecko/2009033017 GranParadiso/3.0.8
-mozilla 1.9.2a2pre Mozilla/5.0 (Windows; U; Windows NT 6.1; cs; rv:1.9.2a2pre) Gecko/20090912 Namoroka/3.6a2pre (.NET CLR 3.5.30729)
-mozilla 1.9.2a2pre Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2a2pre) Gecko/20090901 Ubuntu/9.10 (karmic) Namoroka/3.6a2pre
-mozilla 1.9.2a1 Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2a1) Gecko/20090806 Namoroka/3.6a1
-mozilla 1.9.1b3pre Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1b3pre) Gecko/20090109 Shiretoko/3.1b3pre
-mozilla 1.9.1b4pre Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1b4pre) Gecko/20090311 Shiretoko/3.1b4pre
-mozilla 1.8.0.1 Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8.0.1) Gecko/20060314 Flock/0.5.13.2
-mozilla 1.9.0.2 Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.0.2) Gecko/2008092122 Firefox/3.0.2 Flock/2.0b3
-webkit 525.13 Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/525.13 (KHTML, like Gecko) Fluid/0.9.4 Safari/525.13
-mozilla 1.7.12 Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050929 Galeon/1.3.21
-mozilla 1.9.0.8 Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.8) Gecko/20090327 Galeon/2.0.7
-mozilla 1.9.1.5 Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.5) Gecko/20091105 Firefox/3.5.5 compat GlobalMojo/1.5.5 GlobalMojoExt/1.5
-msie 6.0 Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; GreenBrowser)
-msie 7.0 Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727; GreenBrowser)
-msie 7.0 Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; InfoPath.1; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; GreenBrowser)
- 0 HotJava/1.1.2 FCS
-mozilla 0 Mozilla/3.0 (x86 [cs] Windows NT 5.1; Sun)
-mozilla 1.8.0.3 Mozilla/5.1 (X11; U; Linux i686; en-US; rv:1.8.0.3) Gecko/20060425 SUSE/1.5.0.3-7 Hv3/alpha
-msie 7.0 Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; SIMBAR={CFBFDAEA-F21E-4D6E-A9B0-E100A69B860F}; Hydra Browser; .NET CLR 2.0.50727; .NET CLR 1.1.4322; .NET CLR 3.0.04506.30)
-msie 6.0 Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Hydra Browser; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
- 0 IBrowse/2.3 (AmigaOS 3.9)
- 0 Mozilla/5.0 (compatible; IBrowse 3.0; AmigaOS4.0)
- 0 iCab/4.0 (Macintosh; U; Intel Mac OS X)
- 0 Mozilla/4.5 (compatible; iCab 2.9.1; Macintosh; U; PPC)
- 0 iCab/3.0.2 (Macintosh; U; PPC Mac OS X)
- 0 ICE Browser/v5_4_3 (Java 1.4.2; Windows XP 5.1 x86)
-mozilla 0 Mozilla/5.0 (Java 1.6.0_01; Windows XP 5.1 x86; en) ICEbrowser/v6_1_2
- 0 ICE Browser/5.05 (Java 1.4.0; Windows 2000 5.0 x86)
-mozilla 1.8.1.9 Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.9) Gecko/20071030 Iceape/1.1.6 (Debian-1.1.6-3)
-mozilla 1.8.1.8 Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.1.8) Gecko/20071008 Iceape/1.1.5 (Ubuntu-1.1.5-1ubuntu0.7.10)
-mozilla 1.9.0.3 Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.3) Gecko/2008092921 IceCat/3.0.3-g1
-mozilla 1.8.1.11 Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.11) Gecko/20071203 IceCat/2.0.0.11-g1
-mozilla 1.9.0.5 Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.0.5) Gecko/2008122011 Iceweasel/3.0.5 (Debian-3.0.5-1)
-mozilla 1.8.1.1 Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.1.1) Gecko/20061205 Iceweasel/2.0.0.1 (Debian-2.0.0.1+dfsg-4)
-mozilla 1.9.0.5 Mozilla/5.0 (X11; U; Linux i686; it; rv:1.9.0.5) Gecko/2008122011 Iceweasel/3.0.5 (Debian-3.0.5-1)
-msie 4.0 Mozilla/2.0 (compatible; MSIE 4.0; Windows 98)
-msie 6.0 Mozilla/4.0 (Windows; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727)
-msie 7.0 Mozilla/4.0 (Mozilla/4.0; MSIE 7.0; Windows NT 5.1; FDM; SV1; .NET CLR 3.0.04506.30)
-msie 5.01 Mozilla/4.0 (compatible; MSIE 5.01; Windows NT)
-msie 8.0 Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; SLCC1; .NET CLR 2.0.50727; .NET CLR 1.1.4322; InfoPath.2; .NET CLR 3.5.21022; .NET CLR 3.5.30729; MS-RTC LM 8; OfficeLiveConnector.1.4; OfficeLivePatch.1.3; .NET CLR 3.0.30729)
-msie 6.0 Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Center PC 4.0; .NET CLR 2.0.50727)
-msie 5.0b1 Mozilla/4.0 (compatible; MSIE 5.0b1; Mac_PowerPC)
-msie 5.0 Mozilla/4.0 (compatible; MSIE 5.0; Windows NT;)
-msie 5.23 Mozilla/4.0 (compatible; MSIE 5.23; Mac_PowerPC)
-msie 6.0 Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; GTB6; Ant.com Toolbar 1.6; MSIECrawler)
-msie 8.0 Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; GTB5; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.0.04506; InfoPath.2; OfficeLiveConnector.1.3; OfficeLivePatch.0.0)
-msie 7.0 Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; Trident/4.0; SLCC1; .NET CLR 2.0.50727; .NET CLR 1.1.4322; InfoPath.2; .NET CLR 3.5.21022; .NET CLR 3.5.30729; MS-RTC LM 8; OfficeLiveConnector.1.4; OfficeLivePatch.1.3; .NET CLR 3.0.30729)
-msie 7.0 Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; InfoPath.2)
-msie 6.0 Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; iRider 2.21.1108; FDM)
-webkit 528.5 Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/528.5 (KHTML, like Gecko) Iron/0.4.155.0 Safari/528.5
-webkit 528.7 Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/528.7 (KHTML, like Gecko) Iron/1.0.155.0 Safari/528.7
-webkit 525.19 Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/525.19 (KHTML, like Gecko) Iron/0.2.152.0 Safari/12081672.525
-webkit 531.0 Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/531.0 (KHTML, like Gecko) Iron/3.0.189.0 Safari/531.0
-mozilla 1.8.1.19 Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.8.1.19) Gecko/20081217 K-Meleon/1.5.2
-mozilla 1.8.1.21 Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.21) Gecko/20090331 K-Meleon/1.5.3
-mozilla 1.8.0.5 Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.5) Gecko/20060706 K-Meleon/1.0
-mozilla 1.8.1.21 Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.1.21) Gecko/20090331 K-Meleon/1.5.3
-mozilla 1.8.0.6 Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.6) Gecko/20060731 K-Ninja/2.0.2
-mozilla 1.8.1.4pre Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.4pre) Gecko/20070404 K-Ninja/2.1.3
-mozilla 1.8.1.2pre Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.2pre) Gecko/20070215 K-Ninja/2.1.1
-mozilla 1.9 Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9) Gecko/20080705 Firefox/3.0 Kapiko/3.0
-mozilla 0 Mozilla/5.0 (X11; Linux i686; U;) Gecko/20070322 Kazehakase/0.4.5
-mozilla 1.9.0.8 Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.8) Gecko Fedora/1.9.0.8-1.fc10 Kazehakase/0.5.6
-msie 6.0 Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; KKman2.0)
-msie 6.0 Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; KKMAN3.2)
-msie 6.0 Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; KKman3.0)
- 0 Mozilla/5.0 (compatible; Konqueror/3.1-rc5; i686 Linux; 20020712)
- 0 Mozilla/5.0 (compatible; Konqueror/4.3; Windows) KHTML/4.3.0 (like Gecko)
- 0 Mozilla/5.0 (compatible; Konqueror/2.2.1; Linux)
- 0 Mozilla/5.0 (compatible; Konqueror/3.5; SunOS)
- 0 Mozilla/5.0 (compatible; Konqueror/4.1; OpenBSD) KHTML/4.1.4 (like Gecko)
- 0 Links (0.96; Linux 2.4.20-18.7 i586)
- 0 Links (0.98; Win32; 80x25)
- 0 Links (2.1pre18; Linux 2.4.31 i686; 100x37)
- 0 Links (2.1; Linux 2.6.18-gentoo-r6 x86_64; 80x24)
- 0 Links (2.2; Linux 2.6.25-gentoo-r9 sparc64; 166x52)
-msie 6.0 Mozilla/4.0 (compatible; MSIE 6.0; Linux 2.6.26-1-amd64) Lobo/0.98.3
-msie 6.0 Mozilla/4.0 (compatible; MSIE 6.0; Windows XP 5.1) Lobo/0.98.4
- 0 Mozilla/4.0 (compatible; Lotus-Notes/5.0; Windows-NT)
- 0 Mozilla/4.0 (compatible; Lotus-Notes/6.0; Windows-NT)
-msie 6.0 Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322; Lunascape 2.1.3)
-mozilla 1.9.1b3pre Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b3pre) Gecko/2008 Lunascape/4.9.9.98
-msie 6.0 Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; JyxoToolbar1.0; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 1.1.4322; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; Lunascape 5.1.4.5)
-webkit 528 Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/528+ (KHTML, like Gecko, Safari/528.0) Lunascape/5.0.2.0
-mozilla 1.9.1.2 Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.2) Gecko/20090804 Firefox/3.5.2 Lunascape/5.1.4.5
- 0 Lynx/2.8.6rel.4 libwww-FM/2.14 SSL-MM/1.4.1 GNUTLS/1.6.3
- 0 Lynx/2.8.3dev.6 libwww-FM/2.14
- 0 Lynx/2.8.5dev.16 libwww-FM/2.14 SSL-MM/1.4.1 OpenSSL/0.9.7a
-mozilla 1.7.12 Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.12) Gecko/20051001 Firefox/1.0.7 Madfox/0.3.2u3
-webkit 530.6 Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/530.6 (KHTML, like Gecko) Maxthon/3.0 Safari/530.6
-msie 7.0 Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; SV1; Maxthon; .NET CLR 1.1.4322)
-msie 6.0 Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; MyIE2)
-msie 8.0 Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; MAXTHON 2.0)
- 0 Midori/0.1.7
-webkit 532 Midori/0.1.5 (X11; Linux; U; en-gb) WebKit/532+
-mozilla 1.0.1 Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020919
-mozilla 1.7.12 Mozilla/5.0 (Windows; U; Windows NT 5.0; it-IT; rv:1.7.12) Gecko/20050915
-mozilla 1.4 Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4; MultiZilla v1.5.0.0f) Gecko/20030624
-mozilla 1.2.1 Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2.1; MultiZilla v1.1.32 final) Gecko/20021130
- 0 NCSA_Mosaic/2.0 (Windows 3.1)
- 0 NCSA_Mosaic/3.0 (Windows 95)
- 0 NCSA Mosaic/1.0 (X11;SunOS 4.1.4 sun4m)
- 0 NCSA_Mosaic/2.6 (X11; SunOS 4.1.3 sun4m)
- 0 Mozilla/3.01 (compatible; Netbox/3.5 R92; Linux 2.2)
-msie 6.0 Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; NetCaptor 7.5.4; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 1.1.4322; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
-msie 5.01 Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; NetCaptor 6.5.0RC1)
-mozilla 1.7.5 Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20060127 Netscape/8.1
-mozilla 0 Mozilla/4.04 [en] (X11; I; IRIX 5.3 IP22)
-mozilla 0.9.2 Mozilla/5.0 (Windows; U; Win 9x 4.90; de-DE; rv:0.9.2) Gecko/20010726 Netscape6/6.1
-mozilla 1.8.1.12 Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.12) Gecko/20080219 Firefox/2.0.0.12 Navigator/9.0.0.6
-mozilla 0 Mozilla/4.08 [en] (WinNT; U ;Nav)
-mozilla 1.0.2 Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.2) Gecko/20030208 Netscape/7.02
-mozilla 0 Mozilla/3.0 (Win95; I)
-mozilla 0 Mozilla/4.51 [en] (Win98; U)
- 0 NetSurf/2.0 (RISC OS; armv3l)
- 0 NetSurf/1.2 (Linux; i686)
- 0 Mozilla/4.7 (compatible; OffByOne; Windows 2000)
- 0 Mozilla/4.7 (compatible; OffByOne; Windows 98)
- 0 Mozilla/4.5 (compatible; OmniWeb/4.1.1-v424.6; Mac_PowerPC)
- 0 OmniWeb/2.7-beta-3 OWF/1.0
-webkit 420 Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US) AppleWebKit/420+ (KHTML, like Gecko, Safari) OmniWeb/v595
-opera 6.0 Opera/6.0 (Windows 2000; U) [fr]
-opera 7.10 Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Opera 7.10 [en]
-opera 10.00 Opera/9.80 (Windows NT 5.1; U; cs) Presto/2.2.15 Version/10.00
-opera 5.11 Opera/5.11 (Windows 98; U) [en]
-opera 9.51 Opera/9.51 (Macintosh; Intel Mac OS X; U; en)
-opera 6.01 Mozilla/4.0 (compatible; MSIE 5.0; Windows NT 4.0) Opera 6.01 [en]
-opera 9.02 Opera/9.02 (Windows XP; U; ru)
-opera 5.12 Mozilla/4.0 (compatible; MSIE 5.0; Windows 98) Opera 5.12 [en]
-opera 9.70 Opera/9.70 (Linux i686 ; U; en) Presto/2.2.1
-opera 7.03 Opera/7.03 (Windows NT 5.0; U) [en]
-opera 9.24 Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; en) Opera 9.24
-mozilla 1.9.0.7 Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.7) Gecko/2009030821 Firefox/3.0.7 Orca/1.1 build 2
-mozilla 1.9.0.6 Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.6) Gecko/2009022300 Firefox/3.0.6 Orca/1.1 build 1
- 0 Mozilla/1.10 [en] (Compatible; RISC OS 3.70; Oregano 1.10)
-webkit 530.0 Mozilla/5.0 (compatible; Origyn Web Browser; AmigaOS 4.1; ppc; U; en) AppleWebKit/530.0+ (KHTML, like Gecko, Safari/530.0+)
-webkit 531.0 Mozilla/5.0 (compatible; Origyn Web Browser; AmigaOS 4.0; U; en) AppleWebKit/531.0+ (KHTML, like Gecko, Safari/531.0+)
-webkit 528.5 Mozilla/5.0 (compatible; Origyn Web Browser; MorphOS; PPC; U) AppleWebKit/528.5+ (KHTML, like Gecko, Safari/528.5+)
-msie 6.0 Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; PhaseOut-www.phaseout.net)
-mozilla 1.4a Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4a) Gecko/20030411 Phoenix/0.5
-mozilla 1.2b Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2b) Gecko/20021029 Phoenix/0.4
-webkit 527 Mozilla/5.0 (Windows; U; Windows NT 5.1; cs-CZ) AppleWebKit/527+ (KHTML, like Gecko) QtWeb Internet Browser/2.5 http://www.QtWeb.net
-webkit 527 Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/527+ (KHTML, like Gecko) QtWeb Internet Browser/1.2 http://www.QtWeb.net
-webkit 527 Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/527+ (KHTML, like Gecko) QtWeb Internet Browser/1.7 http://www.QtWeb.net
-webkit 527 Mozilla/5.0 (X11; U; Linux; cs-CZ) AppleWebKit/527+ (KHTML, like Gecko, Safari/419.3) rekonq
- 0 retawq/0.2.6c [en] (text)
-webkit 312.8 Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-us) AppleWebKit/312.8 (KHTML, like Gecko) Safari/312.6
-webkit 528.16 Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_5_6; it-it) AppleWebKit/528.16 (KHTML, like Gecko) Version/4.0 Safari/528.16
-webkit 523.15 Mozilla/5.0 (Windows; U; Windows NT 5.1; cs-CZ) AppleWebKit/523.15 (KHTML, like Gecko) Version/3.0 Safari/523.15
-webkit 125.2 Mozilla/5.0 (Macintosh; U; PPC Mac OS X; de-de) AppleWebKit/125.2 (KHTML, like Gecko) Safari/125.7
-webkit 528.16 Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/528.16 (KHTML, like Gecko) Version/4.0 Safari/528.16
-webkit 420 Mozilla/5.0 (Macintosh; U; PPC Mac OS X; fi-fi) AppleWebKit/420+ (KHTML, like Gecko) Safari/419.3
-mozilla 1.8.1.13 Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.13) Gecko/20080313 SeaMonkey/1.1.9
-mozilla 1.9.1a2pre Mozilla/5.0 (X11; U; Linux i686; rv:1.9.1a2pre) Gecko/20080824052448 SeaMonkey/2.0a1pre
-mozilla 1.8.1.6 Mozilla/5.0 (Windows; U; Win 9x 4.90; en-GB; rv:1.8.1.6) Gecko/20070802 SeaMonkey/1.1.4
-mozilla 1.9.1b3pre Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1b3pre) Gecko/20081208 SeaMonkey/2.0a3pre
-mozilla 1.9a1 Mozilla/5.0 (BeOS; U; BeOS BePC; en-US; rv:1.9a1) Gecko/20060702 SeaMonkey/1.5a
-mozilla 1.9.1b3pre Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1b3pre) Gecko/20081202 SeaMonkey/2.0a2
-webkit 419 Mozilla/5.0 (Macintosh; U; PPC Mac OS X; ja-jp) AppleWebKit/419 (KHTML, like Gecko) Shiira/1.2.3 Safari/125
-webkit 417.9 Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/417.9 (KHTML, like Gecko, Safari) Shiira/1.1
-webkit 418.9.1 Mozilla/5.0 (Macintosh; U; Intel Mac OS X; fr) AppleWebKit/418.9.1 (KHTML, like Gecko) Shiira Safari/125
-msie 6.0 Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Sleipnir/2.8.1
-msie 7.0 Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; InfoPath.1; .NET CLR 2.0.50727) Sleipnir/2.8.4
-webkit 525.27.1 Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_5; en-us) AppleWebKit/525.27.1 (KHTML, like Gecko) Stainless/0.4 Safari/525.20.1
-webkit 528.16 Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_6; en-us) AppleWebKit/528.16 (KHTML, like Gecko) Stainless/0.5.3 Safari/525.20.1
-webkit 525.18 Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_4_11; en) AppleWebKit/525.18 (KHTML, like Gecko) Sunrise/1.7.4 like Safari/4525.22
-webkit 125.5.7 Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-us) AppleWebKit/125.5.7 (KHTML, like Gecko) SunriseBrowser/0.853
-mozilla 1.9.0.10pre Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.10pre) Gecko/2009041814 Firefox/3.0.10pre (Swiftfox)
-msie 6.0 Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 1.1.4322; TheWorld)
-webkit 1.1.8 Webkit/1.1.8 (Linux; en-us) Uzbl
-webkit 1.1.10 Uzbl (X11; U; Linux x86_64; en-GB) AppleWebkit/1.1.10
-webkit 1.1.9 Uzbl (Webkit 1.1.9) (Linux)
-webkit 1.1.10 Uzbl (U; Linux x86_64; en-GB) Webkit 1.1.10
- 0 w3m/0.5.1
- 0 w3m/0.5.2
-webkit 103u Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-us) AppleWebKit/103u (KHTML, like Gecko) wKiosk/100
-mozilla 1.9.0.9 Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.9) Gecko/2009042410 Firefox/3.0.9 Wyzo/3.0.3
- 0 X-Smiles/1.2-20081113
-msie 7.0 Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; .NET CLR 2.0.50727; .NET CLR 1.1.4322; .NET CLR 3.0.04506.30; MEGAUPLOAD 2.0)
-msie 7.0 Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30)
-mozilla 1.9.0.4 Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.9.0.4) Gecko/2008111217 Fedora/3.0.4-1.fc9 Firefox/3.0.4
-mozilla 1.9.0.4 Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.0.4) Gecko/2008102920 Firefox/3.0.4
-msie 7.0 Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.0.04506; .NET CLR 1.1.4322; FDM)
-msie 6.0 mozilla/4.0 (compatible; msie 6.0; windows nt 5.1; mra 4.6 (build 01425); .net clr 2.0.50727)
-msie 7.0 mozilla/4.0 (compatible; msie 7.0; windows nt 5.1; mra 4.9 (build 01863))
-msie 7.0 Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; InfoPath?.2; .NET CLR 3.5.21022; .NET CLR 3.5.30729; .NET CLR 3.0.30618; MS-RTC LM 8; .NET CLR 1.1.4322)
-msie 7.0 Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; .NET CLR 3.0.04506; InfoPath?.2; .NET CLR 3.5.21022)
-msie 7.0 Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Sky Broadband; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; .NET CLR 1.1.4322)
-msie 7.0 Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; InfoPath.2; .NET CLR 3.5.21022; .NET CLR 3.5.30729; .NET CLR 3.0.30618; MS-RTC LM 8; .NET CLR 1.1.4322)
-msie 7.0 Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; .NET CLR 3.0.04506; InfoPath.2; .NET CLR 3.5.21022)
-msie 7.0 Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; GTB6; User-agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; http://bsalsa.com); .NET CLR 1.1.4322; .NET CLR 2.0.50727
-opera 10.00 Opera/9.80 (Macintosh; Intel Mac OS X; U; en) Presto/2.2.15 Version/10.00
-msie 8.0 Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; .NET CLR 1.1.4322; InfoPath?.2; .NET CLR 2.0.50727; CIBA; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
-opera 10.00 Opera/9.80 (X11; Linux x86_64; U; de) Presto/2.2.15 Version/10.00
-opera 10.50 Opera/9.80 (Macintosh; Intel Mac OS X; U; en) Presto/2.5.18 Version/10.50
View
25 test/data/with_fries.xml
@@ -1,25 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <soap:Body>
- <jsconf xmlns="http://example.com/ns1">
- <response xmlns:ab="http://example.com/ns2">
- <meta>
- <component id="seite1" class="component">
- <properties xmlns:cd="http://example.com/ns3">
- <property name="prop1">
- <thing />
- <value>1</value>
- </property>
- <property name="prop2">
- <thing att="something" />
- </property>
- <foo_bar>foo</foo_bar>
- </properties>
- </component>
- </meta>
- </response>
- </jsconf>
- </soap:Body>
-</soap:Envelope>
View
7 test/data/with_fries_over_jsonp.php
@@ -1,7 +0,0 @@
-<?php
-error_reporting(0);
-$callback = $_REQUEST['callback'];
-$json = $_REQUEST['json'];
-$text = json_encode(file_get_contents(dirname(__FILE__)."/with_fries.xml"));
-echo "$callback($text)";
-?>
View
4 test/localfile.html
@@ -51,7 +51,7 @@
function doLog( message, args ) {
jQuery( "<li />").appendTo( logUL ).text( message + ': "' + Array.prototype.join.call( args, '" - "' ) + '"' );
}
- jQuery.ajax( "./data/badjson.js" , {
+ jQuery.ajax( "data/ajax/echo/index.php", {
context: jQuery( "#success" ),
dataType: "text"
}).success(function( data, _, xhr ) {
@@ -61,7 +61,7 @@
doLog( "Success (" + xhr.status + ")" , arguments );
this.addClass( "error" ).text( "FAIL" );
});
- jQuery.ajax( "./data/doesnotexist.ext" , {
+ jQuery.ajax( "error" , {
context: jQuery( "#error" ),
dataType: "text"
}).error(function( xhr ) {
View
1,465 test/unit/ajax.js
@@ -30,9 +30,40 @@ module( "ajax", {
//----------- jQuery.ajax()
- ajaxTest( "jQuery.ajax() - success callbacks", 8, {
+ ajaxTest( "jQuery.ajax() - GET", 1, {
+ type: "GET",
+ url: service("echo"),
+ data: {
+ content: "bar"
+ },
+ success: function( msg ) {
+ strictEqual( msg, "bar", "Check for GET" );
+ }
+ });
+
+ ajaxTest( "jQuery.ajax() - POST", 1, {
+ type: "POST",
+ url: service("echo/"),
+ data: {
+ content: "pan"
+ },
+ success: function( msg ) {
+ strictEqual( msg, "pan", "Check for POST" );
+ }
+ });
+
+ ajaxTest( "jQuery.ajax() - data option - empty bodies for non-GET requests", 1, {
+ type: "POST",
+ url: service("echo/"),
+ data: undefined,
+ success: function( result ) {
+ strictEqual( result, "", "no data given" );
+ }
+ });
+
+ ajaxTest( "jQuery.ajax() - success", 8, {
setup: addGlobalEvents("ajaxStart ajaxStop ajaxSend ajaxComplete ajaxSuccess"),
- url: url("data/name.html"),
+ url: service("echo"),
beforeSend: function() {
ok( true, "beforeSend" );
},
@@ -44,10 +75,10 @@ module( "ajax", {
}
});
- ajaxTest( "jQuery.ajax() - success callbacks - (url, options) syntax", 8, {
+ ajaxTest( "jQuery.ajax() - success - (url, options)", 8, {
setup: addGlobalEvents("ajaxStart ajaxStop ajaxSend ajaxComplete ajaxSuccess"),
create: function( options ) {
- return jQuery.ajax( url("data/name.html"), options );
+ return jQuery.ajax( service("echo"), options );
},
beforeSend: function() {
ok( true, "beforeSend" );
@@ -60,9 +91,9 @@ module( "ajax", {
}
});
- ajaxTest( "jQuery.ajax() - success callbacks (late binding)", 8, {
+ ajaxTest( "jQuery.ajax() - success - late binding", 8, {
setup: addGlobalEvents("ajaxStart ajaxStop ajaxSend ajaxComplete ajaxSuccess"),
- url: url("data/name.html"),
+ url: service("echo"),
beforeSend: function() {
ok( true, "beforeSend" );
},
@@ -78,9 +109,9 @@ module( "ajax", {
}
});
- ajaxTest( "jQuery.ajax() - success callbacks (oncomplete binding)", 8, {
+ ajaxTest( "jQuery.ajax() - success - oncomplete binding", 8, {
setup: addGlobalEvents("ajaxStart ajaxStop ajaxSend ajaxComplete ajaxSuccess"),
- url: url("data/name.html"),
+ url: service("echo"),
beforeSend: function() {
ok( true, "beforeSend" );
},
@@ -96,15 +127,12 @@ module( "ajax", {
}
});
- ajaxTest( "jQuery.ajax() - error callbacks", 8, {
+ ajaxTest( "jQuery.ajax() - error", 8, {
setup: addGlobalEvents("ajaxStart ajaxStop ajaxSend ajaxComplete ajaxError"),
- url: url("data/name.php?wait=5"),
+ url: service("error"),
beforeSend: function() {
ok( true, "beforeSend" );
},
- afterSend: function( request ) {
- request.abort();
- },
error: function() {
ok( true, "error" );
},
@@ -113,9 +141,12 @@ module( "ajax", {
}
});
- ajaxTest( "jQuery.ajax() - textStatus and errorThrown values", 4, [
+ ajaxTest( "jQuery.ajax() - abort - textStatus and errorThrown values", 4, [
{
- url: url("data/name.php?wait=5"),
+ url: service("echo"),
+ data: {
+ delay: 1
+ },
error: function( _, textStatus, errorThrown ) {
strictEqual( textStatus, "abort", "textStatus is 'abort' for abort" );
strictEqual( errorThrown, "abort", "errorThrown is 'abort' for abort" );
@@ -125,7 +156,10 @@ module( "ajax", {
}
},
{
- url: url("data/name.php?wait=5"),
+ url: service("echo"),
+ data: {
+ delay: 1
+ },
error: function( _, textStatus, errorThrown ) {
strictEqual( textStatus, "mystatus", "textStatus is 'mystatus' for abort('mystatus')" );
strictEqual( errorThrown, "mystatus", "errorThrown is 'mystatus' for abort('mystatus')" );
@@ -136,8 +170,12 @@ module( "ajax", {
}
]);
- ajaxTest( "jQuery.ajax() - responseText on error", 1, {
- url: url("data/errorWithText.php"),
+ ajaxTest( "jQuery.ajax() - error - responseText", 1, {
+ url: service("echo"),
+ data: {
+ status: 400,
+ content: "plain text message"
+ },
error: function( xhr ) {
strictEqual( xhr.responseText, "plain text message", "Test jqXHR.responseText is filled for HTTP errors" );
}
@@ -147,15 +185,15 @@ module( "ajax", {
var previousUrl,
firstTime = true;
jQuery.ajax({
- url: url("data/errorWithText.php"),
+ url: service("error"),
error: function() {
if ( firstTime ) {
firstTime = false;
jQuery.ajax( this );
} else {
ok ( true, "Test retrying with jQuery.ajax(this) works" );
jQuery.ajax({
- url: url("data/errorWithText.php"),
+ url: service("error"),
data: {
"x": 1
},
@@ -177,13 +215,16 @@ module( "ajax", {
});
});
- ajaxTest( "jQuery.ajax() - headers", 4, {
+ ajaxTest( "jQuery.ajax() - headers - request", 1, {
setup: function() {
jQuery( document ).ajaxSend(function( evt, xhr ) {
xhr.setRequestHeader( "ajax-send", "test" );
});
},
- url: url("data/headers.php?keys=siMPle_SometHing-elsE_OthEr_ajax-send"),
+ url: service("headers/request"),
+ data: {
+ headers: "siMPle,SometHing-elsE,OthEr,ajax-send"
+ },
headers: {
"siMPle": "value",
"SometHing-elsE": "other value",
@@ -201,20 +242,39 @@ module( "ajax", {
tmp = tmp.join("");
strictEqual( data, tmp, "Headers were sent" );
- strictEqual( xhr.getResponseHeader("Sample-Header"), "Hello World", "Sample header received" );
-
- emptyHeader = xhr.getResponseHeader("Empty-Header");
+ }
+ });
+
+ ajaxTest( "jQuery.ajax() - headers - response", 3, {
+ setup: function() {
+ jQuery( document ).ajaxSend(function( evt, xhr ) {
+ xhr.setRequestHeader( "ajax-send", "test" );
+ });
+ },
+ url: service("headers/response"),
+ data: {
+ "Sample-Header": "sample value",
+ "Sample-Header2": "sample value 2",
+ "Empty-Header": ""
+ },
+ success: function( data, _, xhr ) {
+ var emptyHeader = xhr.getResponseHeader("Empty-Header");
if ( emptyHeader === null ) {
ok( true, "Firefox doesn't support empty headers" );
} else {
strictEqual( emptyHeader, "", "Empty header received" );
}
- strictEqual( xhr.getResponseHeader("Sample-Header2"), "Hello World 2", "Second sample header received" );
+ strictEqual( xhr.getResponseHeader("Sample-Header"), "sample value", "Sample header received" );
+ strictEqual( xhr.getResponseHeader("Sample-Header2"), "sample value 2", "Second sample header received" );
+
}
});
- ajaxTest( "jQuery.ajax() - Accept header", 1, {
- url: url("data/headers.php?keys=accept"),
+ ajaxTest( "jQuery.ajax() - headers - Accept", 1, {
+ url: service("headers/request"),
+ data: {
+ headers: "accept"
+ },
headers: {
Accept: "very wrong accept value"
},
@@ -226,24 +286,30 @@ module( "ajax", {
}
});
- ajaxTest( "jQuery.ajax() - contentType", 2, [
+ ajaxTest( "jQuery.ajax() - headers - contentType option", 2, [
{
- url: url("data/headers.php?keys=content-type"),
+ url: service("headers/request"),
+ data: {
+ headers: "content-type"
+ },
contentType: "test",
success: function( data ) {
- strictEqual( data, "content-type: test\n", "Test content-type is sent when options.contentType is set" );
+ ok( data, "content-type: test\n", "Test content-type is sent when options.contentType is set" );
}
},
{
- url: url("data/headers.php?keys=content-type"),
+ url: service("headers/request"),
+ data: {
+ headers: "content-type"
+ },
contentType: false,
success: function( data ) {
strictEqual( data, "content-type: \n", "Test content-type is not sent when options.contentType===false" );
}
}
]);
- ajaxTest( "jQuery.ajax() - protocol-less urls", 1, {
+ ajaxTest( "jQuery.ajax() - url - protocol-less", 1, {
url: "//somedomain.com",
beforeSend: function( xhr, settings ) {
equal( settings.url, location.protocol + "//somedomain.com", "Make sure that the protocol is added." );
@@ -252,37 +318,37 @@ module( "ajax", {
error: true
});
- ajaxTest( "jQuery.ajax() - hash", 3, [
+ ajaxTest( "jQuery.ajax() - url - hash", 3, [
{
- url: "data/name.html#foo",
+ url: "path/to/service#foo",
beforeSend: function( xhr, settings ) {
- equal( settings.url, "data/name.html", "Make sure that the URL is trimmed." );
+ strictEqual( settings.url, "path/to/service", "Make sure that the URL is trimmed." );
return false;
},
error: true
},
{
- url: "data/name.html?abc#foo",
+ url: "path/to/service?abc#foo",
beforeSend: function( xhr, settings ) {
- equal( settings.url, "data/name.html?abc", "Make sure that the URL is trimmed." );
+ strictEqual( settings.url, "path/to/service?abc", "Make sure that the URL is trimmed." );
return false;
},
error: true
},
{
- url: "data/name.html?abc#foo",
+ url: "path/to/service?abc#foo",
data: {
"test": 123
},
beforeSend: function( xhr, settings ) {
- equal( settings.url, "data/name.html?abc&test=123", "Make sure that the URL is trimmed." );
+ equal( settings.url, "path/to/service?abc&test=123", "Make sure that the URL is trimmed." );
return false;
},
error: true
}
]);
- ajaxTest( "jQuery.ajax() - cross-domain detection", 7, function() {
+ ajaxTest( "jQuery.ajax() - url - cross-domain detection", 7, function() {
function request( url, title, crossDomainOrOptions ) {
return jQuery.extend( {
dataType: "jsonp",
@@ -338,7 +404,10 @@ module( "ajax", {
ajaxTest( "jQuery.ajax() - abort", 9, {
setup: addGlobalEvents("ajaxStart ajaxStop ajaxSend ajaxError ajaxComplete"),
- url: url("data/name.php?wait=5"),
+ url: service("echo"),
+ data: {
+ delay: 1
+ },
beforeSend: function() {
ok( true, "beforeSend" );
},
@@ -353,71 +422,76 @@ module( "ajax", {
}
});
- ajaxTest( "jQuery.ajax() - events with context", 12, function() {
+ ajaxTest( "jQuery.ajax() - context", 12, function() {
- var context = document.createElement("div");
+ var context;
function event( e ) {
- equal( this, context, e.type );
+ strictEqual( this, context, e.type );
}
function callback( msg ) {
return function() {
- equal( this, context, "context is preserved on callback " + msg );
+ strictEqual( this, context, "context is preserved on callback " + msg );
};
}
return {
setup: function() {
- jQuery( context ).appendTo("#foo")
- .ajaxSend( event )
- .ajaxComplete( event )
- .ajaxError( event )
- .ajaxSuccess( event );
+ var target = jQuery("#foo").on( "ajaxSend ajaxComplete ajaxError ajaxSuccess", event );
+ context = target[ 0 ];
+ jQuery.each( this.requests, function( _, options ) {
+ options.context = context;
+ });
+ },
+ teardown: function() {
+ // Let everything fire properly
+ setTimeout(function() {
+ jQuery("#foo").off("ajaxSend ajaxComplete ajaxError ajaxSuccess");
+ start();
+ }, 0 );
},
requests: [{
- url: url("data/name.html"),
- context: context,
+ url: service("echo"),
beforeSend: callback("beforeSend"),
success: callback("success"),
complete: callback("complete")
}, {
- url: url("data/404.html"),
- context: context,
+ url: service("error"),
beforeSend: callback("beforeSend"),
error: callback("error"),
complete: callback("complete")
}]
};
});
- ajaxTest( "jQuery.ajax() - events without context", 3, function() {
+ ajaxTest( "jQuery.ajax() - context - none", 3, function() {
function nocallback( msg ) {
return function() {
- equal( typeof this.url, "string", "context is settings on callback " + msg );
+ strictEqual( typeof this.url, "string", "context is settings on callback " + msg );
};
}
return {
- url: url("data/404.html"),
+ url: service("error"),
beforeSend: nocallback("beforeSend"),
error: nocallback("error"),
complete: nocallback("complete")
};
});
- ajaxTest( "jQuery.ajax() - context modification", 1, {
- url: url("data/name.html"),
+ ajaxTest( "jQuery.ajax() - context - modification", 1, {
+ url: service("error"),
context: {},
beforeSend: function() {
this.test = "foo";
},
afterSend: function() {
strictEqual( this.context.test, "foo", "Make sure the original object is maintained." );
},
- success: true
+ error: true
});
- ajaxTest( "jQuery.ajax() - context modification through ajaxSetup", 3, function() {
+ ajaxTest( "jQuery.ajax() - context - ajaxSetup", 3, function() {
var obj = {};
return {
setup: function() {
@@ -427,24 +501,24 @@ module( "ajax", {
strictEqual( jQuery.ajaxSettings.context, obj, "Make sure the context is properly set in ajaxSettings." );
},
requests: [{
- url: url("data/name.html"),
- success: function() {
+ url: service("error"),
+ error: function() {
strictEqual( this, obj, "Make sure the original object is maintained." );
}
}, {
- url: url("data/name.html"),
+ url: service("error"),
context: {},
- success: function() {
+ error: function() {
ok( this !== obj, "Make sure overidding context is possible." );
}
}]
};
});
- ajaxTest( "jQuery.ajax() - disabled globals", 3, {
+ ajaxTest( "jQuery.ajax() - events - disable", 3, {
setup: addGlobalEvents(""),
global: false,
- url: url("data/name.html"),
+ url: service("echo"),
beforeSend: function() {
ok( true, "beforeSend" );
},
@@ -456,60 +530,77 @@ module( "ajax", {
}
});
- ajaxTest( "jQuery.ajax() - xml: non-namespace elements inside namespaced elements", 3, {
- url: url("data/with_fries.xml"),
- dataType: "xml",
+ ajaxTest( "jQuery.ajax() - xml - non-namespace elements inside namespaced elements", 3, {
+ url: service("echo"),
+ data: {
+ contentType: "text/xml",
+ content: createWithFriesXML( true )
+ },
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" );
+ strictEqual( jQuery( "properties", resp ).length, 1, "properties in responseXML" );
+ strictEqual( jQuery( "jsconf", resp ).length, 1, "jsconf in responseXML" );
+ strictEqual( jQuery( "thing", resp ).length, 2, "things in responseXML" );
}
});
- ajaxTest( "jQuery.ajax() - xml: non-namespace elements inside namespaced elements (over JSONP)", 3, {
- url: url("data/with_fries_over_jsonp.php"),
+ ajaxTest( "jQuery.ajax() - xml - non-namespace elements inside namespaced elements (over JSONP)", 3, {
+ url: service("echo"),
+ data: {
+ content: createWithFriesXML( true )
+ },
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" );
+ strictEqual( jQuery( "properties", resp ).length, 1, "properties in responseXML" );
+ strictEqual( jQuery( "jsconf", resp ).length, 1, "jsconf in responseXML" );
+ strictEqual( jQuery( "thing", resp ).length, 2, "things in responseXML" );
}
});
- ajaxTest( "jQuery.ajax() - HEAD requests", 2, [
- {
- url: url("data/name.html"),
- type: "HEAD",
- success: function( data, status, xhr ) {
- ok( /Date/i.test( xhr.getAllResponseHeaders() ), "No Date in HEAD response" );
- }
+ ajaxTest( "jQuery.ajax() - atom+xml", 2, {
+ url: service("echo"),
+ data: {
+ content: "<root><element /></root>",
+ contentType: "atom+xml"
},
- {
- url: url("data/name.html"),
- data: {
- "whip_it": "good"
- },
- type: "HEAD",
- success: function( data, status, xhr ) {
- ok( /Date/i.test( xhr.getAllResponseHeaders() ), "No Date in HEAD response with data" );
- }
+ success: function( xml ) {
+ strictEqual( jQuery( "root", xml ).length, 1, "root in responseXML" );
+ strictEqual( jQuery( "element", xml ).length, 1, "element in responseXML" );
}
- ]);
+ });
+
+ ajaxTest( "jQuery.ajax() - HEAD requests", 2, function() {
+ function request( method ) {
+ return {
+ url: service("echo/"),
+ data: {
+ content: "head request"
+ },
+ type: method,
+ success: function( data, status, xhr ) {
+ strictEqual( data, method === "HEAD" ? "" : "head request", "Content (" + method + ")" );
+ }
+ };
+ }
+ return [
+ request("HEAD"),
+ request("GET")
+ ];
+ });
ajaxTest( "jQuery.ajax() - beforeSend", 1, {
- url: url("data/name.html"),
+ url: service("error"),
beforeSend: function( xml ) {
this.check = true;
},
- success: function( data ) {
+ error: function( data ) {
ok( this.check, "check beforeSend was executed" );
}
});
ajaxTest( "jQuery.ajax() - beforeSend, cancel request manually", 2, {
create: function() {
return jQuery.ajax({
- url: url("data/name.html"),
+ url: service("error"),
beforeSend: function( xhr ) {
ok( true, "beforeSend got called, canceling" );
xhr.abort();
@@ -530,13 +621,16 @@ module( "ajax", {
}
});
- ajaxTest( "jQuery.ajax() - dataType html", 5, {
+ ajaxTest( "jQuery.ajax() - html", 5, {
setup: function() {
Globals.register("testFoo");
Globals.register("testBar");
},
dataType: "html",
- url: url("data/test.html"),
+ url: service("echo"),
+ data: {
+ content: createComplexHTML()
+ },
success: function( data ) {
ok( data.match( /^html text/ ), "Check content for datatype html" );
jQuery("#ap").html( data );
@@ -546,17 +640,23 @@ module( "ajax", {
});
ajaxTest( "jQuery.ajax() - synchronous request", 1, {
- url: url("data/json_obj.js"),
+ url: service("echo"),
+ data: {
+ content: "hello world"
+ },
dataType: "text",
async: false,
success: true,
afterSend: function( xhr ) {
- ok( /^\{ "data"/.test( xhr.responseText ), "check returned text" );
+ strictEqual( xhr.responseText, "hello world", "check returned text" );
}
});
- ajaxTest( "jQuery.ajax() - synchronous request with callbacks", 2, {
- url: url("data/json_obj.js"),
+ ajaxTest( "jQuery.ajax() - synchronous request - callbacks", 2, {
+ url: service("echo"),
+ data: {
+ content: "hello world"
+ },
async: false,
dataType: "text",
success: true,
@@ -566,36 +666,33 @@ module( "ajax", {
ok( true, "success callback executed" );
result = data;
});
- ok( /^\{ "data"/.test( result ), "check returned text" );
+ strictEqual( result, "hello world", "check returned text" );
}
});
- asyncTest( "jQuery.ajax(), jQuery.get[Script|JSON](), jQuery.post(), pass-through request object", 8, function() {
- var target = "data/name.html";
- var successCount = 0;
- var errorCount = 0;
- var errorEx = "";
- var success = function() {
+ asyncTest( "jQuery.ajax(), jQuery.get[Script|JSON](), jQuery.post(), pass-through request object", 7, function() {
+ var successCount = 0,
+ errorCount = 0,
+ errorEx = [];
+ function success() {
successCount++;
- };
- jQuery( document ).on( "ajaxError.passthru", function( e, xml, s, ex ) {
+ }
+ jQuery( document ).ajaxError(function( e, xhr, s, ex ) {
errorCount++;
- errorEx += ": " + xml.status;
+ errorEx.push( s.dataType + " / " + xhr.status + " / " + ex + " " );
});
- jQuery( document ).one( "ajaxStop", function() {
- equal( successCount, 5, "Check all ajax calls successful" );
- equal( errorCount, 0, "Check no ajax errors (status" + errorEx + ")" );
- jQuery( document ).off("ajaxError.passthru");
+ jQuery( document ).ajaxStop(function() {
+ strictEqual( successCount, 5, "Check all ajax calls successful" );
+ strictEqual( errorCount, 0, "Check no ajax errors ( " + errorEx.join() + ")" );
start();
});
- Globals.register("testBar");
- ok( jQuery.get( url(target), success ), "get" );
- ok( jQuery.post( url(target), success ), "post" );
- ok( jQuery.getScript( url("data/test.js"), success ), "script" );
- ok( jQuery.getJSON( url("data/json_obj.js"), success ), "json" );
+ ok( jQuery.get( service("echo"), success ), "get" );
+ ok( jQuery.post( service("echo"), success ), "post" );
+ ok( jQuery.getScript( service("echo"), success ), "script" );
+ ok( jQuery.getJSON( service("echo?content=0"), success ), "json" );
ok( jQuery.ajax({
- url: url( target ),
+ url: service("echo"),
success: success
}), "generic" );
});
@@ -623,443 +720,305 @@ module( "ajax", {
return [
request(
- "data/text.php",
+ "path/to/service",
"no parameter"
),
request(
- "data/text.php?pizza=true",
+ "path/to/service?pizza=true",
"1 parameter"
),
request(
- "data/text.php?_=tobereplaced555",
+ "path/to/service?_=tobereplaced555",
"_= parameter"
),
request(
- "data/text.php?pizza=true&_=tobereplaced555",
+ "path/to/service?pizza=true&_=tobereplaced555",
"1 parameter and _="
),
request(
- "data/text.php?_=tobereplaced555&tv=false",
+ "path/to/service?_=tobereplaced555&tv=false",
"_= and 1 parameter"
),
request(
- "data/text.php?name=David&_=tobereplaced555&washere=true",
+ "path/to/service?name=David&_=tobereplaced555&washere=true",
"2 parameters surrounding _="
)
];
});
jQuery.each( [ " - Same Domain", " - Cross Domain" ], function( crossDomain, label ) {
+
+ function request( options ) {
+ var tmp = jQuery.extend( true, {
+ data: {
+ content: "041275"
+ },
+ dataType: "jsonp",
+ crossDomain: crossDomain,
+ success: !options.fail && !options.error && function( data ) {
+ strictEqual( data, "041275", "JSON results returned - " + this.type + " - " + options.title );
+ }
+ }, options );
+ tmp.url = service( "echo" + ( options.url || "" ) );
+ return tmp;
+ }
ajaxTest( "jQuery.ajax() - JSONP - Query String (?n)" + label, 4, [
- {
- url: "data/jsonp.php?callback=?",
- dataType: "jsonp",
- crossDomain: crossDomain,
- success: function( data ) {
- ok( data.data, "JSON results returned (GET, url callback)" );
- }
- },
- {
- url: "data/jsonp.php?callback=??",
- dataType: "jsonp",
- crossDomain: crossDomain,
- success: function( data ) {
- ok( data.data, "JSON results returned (GET, url context-free callback)" );
- }
- },
- {
- url: "data/jsonp.php/??",
- dataType: "jsonp",
- crossDomain: crossDomain,
- success: function( data ) {
- ok( data.data, "JSON results returned (GET, REST-like)" );
- }
- },
- {
- url: "data/jsonp.php/???json=1",
- dataType: "jsonp",
- crossDomain: crossDomain,
- success: function( data ) {
- strictEqual( jQuery.type( data ), "array", "JSON results returned (GET, REST-like with param)" );
+ request({
+ title: "URL Callback",
+ url: "?callback=?"
+ }),
+ request({
+ title: "URL Context-Free Callback",
+ url: "?callback=??"
+ }),
+ request({
+ title: "REST-like",
+ url: "/index.php/??"
+ }),
+ request({
+ title: "REST-like (with param)",
+ url: "/index.php/???content=\"041275\"",
+ beforeSend: function() {
+ delete this.data;
}
- }
+ })
]);
- ajaxTest( "jQuery.ajax() - JSONP - Explicit callback param" + label, 9, {
+ ajaxTest( "jQuery.ajax() - JSONP - Explicit callback param" + label, 8, {
setup: function() {
Globals.register("functionToCleanUp");
+ Globals.register("functionToCleanUpAfterEarlyAbort");
Globals.register("XXX");
Globals.register("jsonpResults");
window["jsonpResults"] = function( data ) {
- ok( data["data"], "JSON results returned (GET, custom callback function)" );
+ strictEqual( data, "041275", "JSON results returned - GET - custom callback function" );
};
},
- requests: [{
- url: "data/jsonp.php",
- dataType: "jsonp",
- crossDomain: crossDomain,
- jsonp: "callback",
- success: function( data ) {
- ok( data["data"], "JSON results returned (GET, data obj callback)" );
- }
- }, {
- url: "data/jsonp.php",
- dataType: "jsonp",
- crossDomain: crossDomain,
- jsonpCallback: "jsonpResults",
- success: function( data ) {
- ok( data.data, "JSON results returned (GET, custom callback name)" );
- }
- }, {
- url: "data/jsonp.php",
- dataType: "jsonp",
- crossDomain: crossDomain,
- jsonpCallback: "functionToCleanUp",
- success: function( data ) {
- ok( data["data"], "JSON results returned (GET, custom callback name to be cleaned up)" );
- strictEqual( window["functionToCleanUp"], undefined, "Callback was removed (GET, custom callback name to be cleaned up)" );
- var xhr;
- jQuery.ajax({
- url: "data/jsonp.php",
- dataType: "jsonp",
- crossDomain: crossDomain,
- jsonpCallback: "functionToCleanUp",
- beforeSend: function( jqXHR ) {
- xhr = jqXHR;
- return false;
- }
- });
- xhr.fail(function() {
- ok( true, "Ajax error JSON (GET, custom callback name to be cleaned up)" );
- strictEqual( window["functionToCleanUp"], undefined, "Callback was removed after early abort (GET, custom callback name to be cleaned up)" );
- });
- }
- }, {
- url: "data/jsonp.php?callback=XXX",
- dataType: "jsonp",
- jsonp: false,
- jsonpCallback: "XXX",
- crossDomain: crossDomain,
- beforeSend: function() {
- ok( /^data\/jsonp.php\?callback=XXX&_=\d+$/.test( this.url ), "The URL wasn't messed with (GET, custom callback name with no url manipulation)" );
- },
- success: function( data ) {
- ok( data["data"], "JSON results returned (GET, custom callback name with no url manipulation)" );
- }
- }]
+ requests: [
+ request({
+ title: "jsonp option",
+ jsonp: "callback"
+ }),
+ request({
+ title: "jsonpCallback option",
+ jsonpCallback: "jsonpResults"
+ }),
+ request({
+ title: "no URL manipulation",
+ url: "/index.php/XXX",
+ jsonp: false,
+ jsonpCallback: "XXX",
+ beforeSend: function() {
+ ok( /\/XXX\?\d+&content=041275&_=\d+$/.test( this.url ), "The URL wasn't messed with" );
+ }
+ }),
+ request({
+ title: "jsonpCallback option - cleanup",
+ jsonpCallback: "functionToCleanUp",
+ done: function( data ) {
+ strictEqual( window["functionToCleanUp"], undefined, "Callback was removed" );
+ }
+ }),
+ request({
+ title: "jsonpCallback option - cleanup after early abort",
+ jsonpCallback: "functionToCleanUpAfterEarlyAbort",
+ beforeSend: function() {
+ return false;
+ },
+ fail: function() {
+ strictEqual( window["functionToCleanUpAfterEarlyAbort"], undefined, "Callback was removed after early abort" );
+ }
+ })
+ ]
});
ajaxTest( "jQuery.ajax() - JSONP - Callback in data" + label, 2, [
- {
- url: "data/jsonp.php",
- dataType: "jsonp",
- crossDomain: crossDomain,
- data: "callback=?",
- success: function( data ) {
- ok( data.data, "JSON results returned (GET, data callback)" );
- }
- },
- {
- url: "data/jsonp.php",
- dataType: "jsonp",
- crossDomain: crossDomain,
- data: "callback=??",
- success: function( data ) {
- ok( data.data, "JSON results returned (GET, data context-free callback)" );
- }
- }
+ request({
+ title: "data callback",
+ data: "content=041275&callback=?"
+ }),
+ request({
+ title: "data context-free callback",
+ data: "content=041275&callback=??"
+ })
]);
ajaxTest( "jQuery.ajax() - JSONP - POST" + label, 3, [
- {
+ request({
+ title: "no callback",
type: "POST",
- url: "data/jsonp.php",
- dataType: "jsonp",
- crossDomain: crossDomain,
- success: function( data ) {
- ok( data["data"], "JSON results returned (POST, no callback)" );
- }
- },
- {
+ url: "/"
+ }),
+ request({
+ title: "data callback",
type: "POST",
- url: "data/jsonp.php",
- data: "callback=?",
- dataType: "jsonp",
- crossDomain: crossDomain,
- success: function( data ) {
- ok( data["data"], "JSON results returned (POST, data callback)" );
- }
- },
- {
+ url: "/",
+ data: "content=041275&callback=?"
+ }),
+ request({
+ title: "data obj callback",
type: "POST",
- url: "data/jsonp.php",
- jsonp: "callback",
- dataType: "jsonp",
- crossDomain: crossDomain,
- success: function( data ) {
- ok( data["data"], "JSON results returned (POST, data obj callback)" );
- }
- }
+ url: "/",
+ jsonp: "callback"
+ })
]);
ajaxTest( "jQuery.ajax() - JSONP" + label, 3, [
- {
- url: "data/jsonp.php",
- dataType: "jsonp",
- crossDomain: crossDomain,
- success: function( data ) {
- ok( data.data, "JSON results returned (GET, no callback)" );
- }
- },
- {
+ request({
+ title: "no callback"
+ }),
+ request({
+ title: "no callback and re-use",
create: function( options ) {
var request = jQuery.ajax( options ),
promise = request.then(function( data ) {
- ok( data.data, "first request: JSON results returned (GET, no callback)" );
- request = jQuery.ajax( this ).done(function( data ) {
- ok( data.data, "this re-used: JSON results returned (GET, no callback)" );
- });
+ request = jQuery.ajax( this );
promise.abort = request.abort;
return request;
});
promise.abort = request.abort;
return promise;
- },
- url: "data/jsonp.php",
- dataType: "jsonp",
- crossDomain: crossDomain,
- success: true
- }
+ }
+ })
]);
});
+
+ jQuery.each( [ " - Same Domain", " - Cross Domain" ], function( crossDomain, label ) {
+
+ jQuery.each( [ "GET", "POST" ], function( _, type ) {
+
+ ajaxTest( "jQuery.ajax() - script - " + type + label, 3, {
+ setup: function() {
+ Globals.register("testBar");
+ },
+ type: type,
+ crossDomain: crossDomain,
+ url: service("echo/"),
+ data: {
+ content: "var testBar = true; ok( true, 'script executed' );"
+ },
+ dataType: "script",
+ success: function( data, status ) {
+ strictEqual( window.testBar, true, "Variable declared and set" );
+ strictEqual( status, "success", "Script results returned" );
+ }
+ });
+
+ jQuery.each( "text/javascript application/javascript application/ecmascript application/x-ecmascript".split(" "), function( _, contentType ) {
+ ajaxTest( "jQuery.ajax() - script - " + type + label + " - auto-detected content-type - " + contentType, 2, {
+ converters: {
+ "text script": function( text ) {
+ strictEqual( text, "", "content-type detected" );
+ }
+ },
+ url: service("headers/response/"),
+ data: {
+ "Content-Type": contentType
+ },
+ success: function() {
+ ok( true, "success" );
+ }
+ });
+ });
- ajaxTest( "jQuery.ajax() - script, Remote", 2, {
- setup: function() {
- Globals.register("testBar");
- },
- url: window.location.href.replace( /[^\/]*$/, "" ) + "data/test.js",
- dataType: "script",
- success: function( data ) {
- strictEqual( window["testBar"], "bar", "Script results returned (GET, no callback)" );
- }
- });
-
- ajaxTest( "jQuery.ajax() - script, Remote with POST", 3, {
- setup: function() {
- Globals.register("testBar");
- },
- url: window.location.href.replace( /[^\/]*$/, "" ) + "data/test.js",
- type: "POST",
- dataType: "script",
- success: function( data, status ) {
- strictEqual( window["testBar"], "bar", "Script results returned (POST, no callback)" );
- strictEqual( status, "success", "Script results returned (POST, no callback)" );
- }
- });
-
- ajaxTest( "jQuery.ajax() - script, Remote with scheme-less URL", 2, {
- setup: function() {
- Globals.register("testBar");
- },
- url: window.location.href.replace( /[^\/]*$/, "" ).replace( /^.*?\/\//, "//" ) + "data/test.js",
- dataType: "script",
- success: function( data ) {
- strictEqual( window["testBar"], "bar", "Script results returned (GET, no callback)" );
- }
+ });
+
});
ajaxTest( "jQuery.ajax() - malformed JSON", 2, {
- url: "data/badjson.js",
+ url: service("echo"),
+ data: {
+ content: "{bad: toTheBone}"
+ },
dataType: "json",
error: function( xhr, msg, detailedMsg ) {
strictEqual( msg, "parsererror", "A parse error occurred." );
ok( /(invalid|error|exception)/i.test( detailedMsg ), "Detailed parsererror message provided" );
}
});
- ajaxTest( "jQuery.ajax() - script by content-type", 2, [
- {
- url: "data/script.php",
- data: {
- "header": "script"
- },
- success: true
+ ajaxTest( "jQuery.ajax() - JSON - content-type", 2, {
+ converters: {
+ "text json": function( text ) {
+ strictEqual( text, "", "content-type detected" );
+ return 42;
+ }
},
- {
- url: "data/script.php",
- data: {
- "header": "ecma"
- },
- success: true
- }
- ]);
-
- ajaxTest( "jQuery.ajax() - JSON by content-type", 5, {
- url: "data/json.php",
+ url: service("headers/response/index.php"),
data: {
- "header": "json",
- "json": "array"
+ "Content-Type": "application/json"
},
success: function( json ) {
- ok( json.length >= 2, "Check length" );
- strictEqual( json[ 0 ]["name"], "John", "Check JSON: first, name" );
- strictEqual( json[ 0 ]["age"], 21, "Check JSON: first, age" );
- strictEqual( json[ 1 ]["name"], "Peter", "Check JSON: second, name" );
- strictEqual( json[ 1 ]["age"], 25, "Check JSON: second, age" );
+ strictEqual( json, 42, "success" );
}
});
- ajaxTest( "jQuery.ajax() - JSON by content-type disabled with options", 6, {
- url: url("data/json.php"),
+ ajaxTest( "jQuery.ajax() - JSON - content-type disabled", 1, {
+ converters: {
+ "text json": function() {
+ ok( false, "content-type detected" );
+ }
+ },
+ url: service("headers/response/index.php"),
data: {
- "header": "json",
- "json": "array"
+ "Content-Type": "application/json"
},
contents: {
- "json": false
+ json: false
},
- success: function( text ) {
- strictEqual( typeof text, "string", "json wasn't auto-determined" );
- var json = jQuery.parseJSON( text );
- ok( json.length >= 2, "Check length");
- strictEqual( json[ 0 ]["name"], "John", "Check JSON: first, name" );
- strictEqual( json[ 0 ]["age"], 21, "Check JSON: first, age" );
- strictEqual( json[ 1 ]["name"], "Peter", "Check JSON: second, name" );
- strictEqual( json[ 1 ]["age"], 25, "Check JSON: second, age" );
- }
- });
-
- ajaxTest( "jQuery.ajax() - simple get", 1, {
- type: "GET",
- url: url("data/name.php?name=foo"),
- success: function( msg ) {
- strictEqual( msg, "bar", "Check for GET" );
- }
- });
-
- ajaxTest( "jQuery.ajax() - simple post", 1, {
- type: "POST",
- url: url("data/name.php"),
- data: "name=peter",
- success: function( msg ) {
- strictEqual( msg, "pan", "Check for POST" );
+ success: function() {
+ ok( true, "success" );
}