browser/devtools/webconsole/test/test-network-request.html

branch
TOR_BUG_9701
changeset 15
b8a032363ba2
equal deleted inserted replaced
-1:000000000000 0:c9e877000d15
1 <!DOCTYPE HTML>
2 <html dir="ltr" xml:lang="en-US" lang="en-US">
3 <head>
4 <meta charset="utf-8">
5 <title>Console HTTP test page</title>
6 <script type="text/javascript"><!--
7 function makeXhr(aMethod, aUrl, aRequestBody, aCallback) {
8 var xmlhttp = new XMLHttpRequest();
9 xmlhttp.open(aMethod, aUrl, true);
10 xmlhttp.onreadystatechange = function() {
11 if (aCallback && xmlhttp.readyState == 4) {
12 aCallback();
13 }
14 };
15 xmlhttp.send(aRequestBody);
16 }
17
18 function testXhrGet(aCallback) {
19 makeXhr('get', 'test-data.json', null, aCallback);
20 }
21
22 function testXhrPost(aCallback) {
23 makeXhr('post', 'test-data.json', "Hello world!", aCallback);
24 }
25 // --></script>
26 </head>
27 <body>
28 <h1>Heads Up Display HTTP Logging Testpage</h1>
29 <h2>This page is used to test the HTTP logging.</h2>
30
31 <form action="http://example.com/browser/browser/devtools/webconsole/test/test-network-request.html" method="post">
32 <input name="name" type="text" value="foo bar"><br>
33 <input name="age" type="text" value="144"><br>
34 </form>
35 </body>
36 </html>

mercurial