mirror of
https://github.com/HeyPuter/firefox.git
synced 2026-11-13 20:14:57 -10:00
- mochitest folder is renamed browser. - unit folder is rename xpcshell. - all the file and folder for mocha are put in a node folder. We take this as an opportunity to revist our stub-generating mochitests. Previously we had 2 tests for each kind of stubs, one for check, the other one for updating. It was not ideal when you wanted to update all the stubs at once because you add either to mention every 5 files, or unskip the update test files. We now merge the update and the check files in a single test. By default, the test that the stubs are up to date, and if you pass the --setenv WEBCONSOLE_STUBS_UPDATE=true param, it will update the stubs. This allow us to move the function that actually generate the stub in the test file, and have a helper file for multi-purpose functions. Because these tests are failing on TRY, let's disabled them so we can land the test re-organization (we'll re-enable them in Bug 1572667). Differential Revision: https://phabricator.services.mozilla.com/D41344
51 lines
1.6 KiB
HTML
51 lines
1.6 KiB
HTML
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
|
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
|
<!DOCTYPE HTML>
|
|
<html dir="ltr" xml:lang="en-US" lang="en-US">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>Console HTTP test page</title>
|
|
<script type="text/javascript">
|
|
/* exported testXhrGet, testXhrWarn, testXhrPost, testXhrPostSlowResponse */
|
|
"use strict";
|
|
|
|
function makeXhr(method, url, requestBody, callback) {
|
|
const xmlhttp = new XMLHttpRequest();
|
|
xmlhttp.open(method, url, true);
|
|
xmlhttp.onreadystatechange = function() {
|
|
if (callback && xmlhttp.readyState == 4) {
|
|
callback();
|
|
}
|
|
};
|
|
xmlhttp.send(requestBody);
|
|
}
|
|
|
|
function testXhrGet(callback) {
|
|
makeXhr("get", "test-data.json", null, callback);
|
|
}
|
|
|
|
function testXhrWarn(callback) {
|
|
makeXhr("get", "sjs_cors-test-server.sjs", null, callback);
|
|
}
|
|
|
|
function testXhrPost(callback) {
|
|
makeXhr("post", "test-data.json", "Hello world!", callback);
|
|
}
|
|
|
|
function testXhrPostSlowResponse(callback) {
|
|
makeXhr("post", "sjs_slow-response-test-server.sjs", "Hello world!", callback);
|
|
}
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<h1>Heads Up Display HTTP Logging Testpage</h1>
|
|
<h2>This page is used to test the HTTP logging.</h2>
|
|
|
|
<form action="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>
|