3 <script src=
"../../http/tests/inspector/inspector-test.js"></script>
4 <script src=
"../../http/tests/inspector/network-test.js"></script>
7 function checkQuery(query
)
9 var url
= "http://webkit.org?" + query
;
10 var request
= new WebInspector
.NetworkRequest(WebInspector
.targetManager
.mainTarget(), url
, url
, "", "", "");
11 InspectorTest
.addResult("Query: " + request
.queryString());
12 var params
= request
.queryParameters
;
13 InspectorTest
.addResult("Parameters: ");
14 for (var i
= 0; i
< params
.length
; ++i
) {
15 var nameValue
= params
[i
];
16 InspectorTest
.addResult(" " + nameValue
.name
+ ": " + nameValue
.value
);
18 InspectorTest
.addResult("");
21 checkQuery("a=b&c=d");
23 checkQuery("a=b=c=d");
25 InspectorTest
.completeTest();
30 <body onload=
"runTest()">
31 <p>Tests query string parsing.
</p>