4
<title>Test Page</title>
5
<link rel="stylesheet" href="../../../build/test/assets/test-console.css">
14
font-family:monospace;
17
script::before, script::after {
24
content:"<script src=\"" attr(src) "\">";
30
.yui-console, .yui-console-bd {
31
height:auto!important;
32
overflow:auto!important;
33
overflow-y:auto!important;
38
<body class="yui3-skin-sam">
39
<h1>Query String Tests</h1>
41
<p>Tests running...</p>
43
<script src="../../../build/yui/yui.js"></script>
48
baz : { quux : "foo" }
52
baz : { quux : "foo" },
56
function verify (expected) {
57
return function (_, o) {
58
var actual = o.responseText;
60
if (actual !== expected) {
61
throw new Error("Expected: "+expected+"\nActual: "+actual);
64
document.body.appendChild(document.createElement("pre")).innerHTML =
65
"Success! " + expected;
70
YUI({ filter : 'raw' }).use( 'querystring-stringify-simple', 'io-base', function (Y) {
71
Y.io("./test.php?simple_qs", {
75
success : verify('{"POST":{"foo":"bar","baz":"[object Object]"},"GET":{"simple_qs":""}}')
80
YUI({ filter : 'raw' }).use( 'querystring', 'io-base', function (Y) {
81
Y.io("./test.php?with_qs", {
85
success : verify('{"POST":{"foo":"bar","baz":{"quux":"foo"},"arr":["1","2","3"]},"GET":{"with_qs":""}}')