2010-08-28 21:30:49 -07:00
|
|
|
<!DOCTYPE HTML>
|
2010-10-20 10:39:44 -07:00
|
|
|
<html dir="ltr" xml:lang="en-US" lang="en-US">
|
|
|
|
<head>
|
2010-08-28 21:30:49 -07:00
|
|
|
<title>Console HTTP test page</title>
|
2010-10-20 10:39:44 -07:00
|
|
|
<script type="text/javascript"><!--
|
|
|
|
function makeXhr(aMethod, aUrl, aRequestBody, aCallback) {
|
2010-08-28 21:30:49 -07:00
|
|
|
var xmlhttp = new XMLHttpRequest();
|
|
|
|
xmlhttp.open(aMethod, aUrl, true);
|
2010-10-20 10:39:44 -07:00
|
|
|
xmlhttp.onreadystatechange = function() {
|
2010-08-28 21:30:49 -07:00
|
|
|
if (xmlhttp.readyState == 4) {
|
2010-10-20 10:39:44 -07:00
|
|
|
aCallback();
|
2010-08-28 21:30:49 -07:00
|
|
|
}
|
|
|
|
};
|
|
|
|
xmlhttp.send(aRequestBody);
|
|
|
|
}
|
|
|
|
|
2010-10-20 10:39:44 -07:00
|
|
|
function testXhrGet(aCallback) {
|
|
|
|
makeXhr('get', 'test-data.json', null, aCallback);
|
2010-08-28 21:30:49 -07:00
|
|
|
}
|
|
|
|
|
2010-10-20 10:39:44 -07:00
|
|
|
function testXhrPost(aCallback) {
|
|
|
|
makeXhr('post', 'test-data.json', "Hello world!", aCallback);
|
2010-08-28 21:30:49 -07:00
|
|
|
}
|
2010-10-20 10:39:44 -07:00
|
|
|
// --></script>
|
2010-08-28 21:30:49 -07:00
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<h1>Heads Up Display HTTP Logging Testpage</h1>
|
|
|
|
<h2>This page is used to test the HTTP logging.</h2>
|
|
|
|
|
|
|
|
<form action="http://example.com/browser/toolkit/components/console/hudservice/tests/browser/test-network-request.html" method="post">
|
|
|
|
<input name="name" type="text" value="foo bar"><br>
|
|
|
|
<input name="age" type="text" value="144"><br>
|
|
|
|
</form>
|
|
|
|
</body>
|
|
|
|
</html>
|