1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/browser/devtools/webconsole/test/test-network-request.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,36 @@ 1.4 +<!DOCTYPE HTML> 1.5 +<html dir="ltr" xml:lang="en-US" lang="en-US"> 1.6 + <head> 1.7 + <meta charset="utf-8"> 1.8 + <title>Console HTTP test page</title> 1.9 + <script type="text/javascript"><!-- 1.10 + function makeXhr(aMethod, aUrl, aRequestBody, aCallback) { 1.11 + var xmlhttp = new XMLHttpRequest(); 1.12 + xmlhttp.open(aMethod, aUrl, true); 1.13 + xmlhttp.onreadystatechange = function() { 1.14 + if (aCallback && xmlhttp.readyState == 4) { 1.15 + aCallback(); 1.16 + } 1.17 + }; 1.18 + xmlhttp.send(aRequestBody); 1.19 + } 1.20 + 1.21 + function testXhrGet(aCallback) { 1.22 + makeXhr('get', 'test-data.json', null, aCallback); 1.23 + } 1.24 + 1.25 + function testXhrPost(aCallback) { 1.26 + makeXhr('post', 'test-data.json', "Hello world!", aCallback); 1.27 + } 1.28 + // --></script> 1.29 + </head> 1.30 + <body> 1.31 + <h1>Heads Up Display HTTP Logging Testpage</h1> 1.32 + <h2>This page is used to test the HTTP logging.</h2> 1.33 + 1.34 + <form action="http://example.com/browser/browser/devtools/webconsole/test/test-network-request.html" method="post"> 1.35 + <input name="name" type="text" value="foo bar"><br> 1.36 + <input name="age" type="text" value="144"><br> 1.37 + </form> 1.38 + </body> 1.39 +</html>