--- /dev/null
+<?php\r
+$json = $_REQUEST['json'];\r
+if($json) {\r
+ echo '[ {"name": "John", "age": 21}, {"name": "Peter", "age": 25 } ]';\r
+} else {\r
+ echo '{ "data": {"lang": "en", "length": 25} }';\r
+}\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+$wait = $_REQUEST['wait'];\r
+if($wait) {\r
+ sleep($wait);\r
+}\r
+$xml = $_REQUEST['xml'];\r
+if($xml) {\r
+ header("Content-type: text/xml");\r
+ eval("\$result = $xml;");\r
+ echo "<math><calculation>$xml</calculation><result>$result</result></math>";\r
+ die();\r
+}\r
+$name = $_REQUEST['name'];\r
+if($name == 'foo') {\r
+ echo "bar";\r
+ die();\r
+} else if($name == 'peter') {\r
+ echo "pan";\r
+ die();\r
+}\r
+echo "ERROR";\r
+?>
\ No newline at end of file
--- /dev/null
+foobar = "bar";\r
}
function test(name, callback) {
- Test = [];
synchronize(function() {
+ Test = [];
try {
callback();
} catch(e) {
<p id="first">Try them out:</p>\r
<ul id="firstUL"></ul>
<ol id="empty"></ol>
- <form id="form" action="formaction">
- <input type="text" value="Test" name="action" id="text1"/>
- <input type="text" value="Test" id="text2" disabled="disabled"/>
+ <form id="form" action="formaction">\r
+ <input type="text" name="action" value="Test" id="text1"/>
+ <input type="text" name="text2" value="Test" id="text2" disabled="disabled"/>
<input type="radio" name="radio1" id="radio1"/>
<input type="radio" name="radio2" id="radio2" checked/>
\r
<input type="text" id="name" name="name" value="name" />\r
\r
+ <button id="button" name="button">Button</button>\r
+ \r
<textarea id="area1">foobar</textarea>\r
\r
<select name="select1" id="select1">\r
if ( jq[i].tests.length > 0 ) {
var method = jq[i];
var name = addParams(method.name, method.params);
- testFile[testFile.length] = addTestWrapper(name, method.tests.join("\n").decode());
+ for(var j = 0; j < method.tests.length; j++) {
+ if(j > 0) {
+ name += "x";
+ }
+ testFile[testFile.length] = addTestWrapper(name, method.tests[j].decode()) + "\n";
+ }
}
}