Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Bug 836580: Turn on httpd debug output when in verbose or parseable m…

…odes.
  • Loading branch information...
commit 4446c18b687be5d95080330f60c50368bd47eeeb 1 parent e552732
@Mossop authored
Showing with 9 additions and 4 deletions.
  1. +9 −4 test/test-httpd.js
View
13 test/test-httpd.js
@@ -5,6 +5,13 @@
const port = 8099;
const file = require("sdk/io/file");
const { pathFor } = require("sdk/system");
+const { Loader } = require("sdk/test/loader");
+const options = require("@test/options");
+
+const loader = Loader(module);
+const httpd = loader.require("sdk/test/httpd");
+if (options.parseable || options.verbose)
+ loader.sandbox("sdk/test/httpd").DEBUG = true;
exports.testBasicHTTPServer = function(test) {
let basePath = pathFor("TmpD");
@@ -14,8 +21,7 @@ exports.testBasicHTTPServer = function(test) {
fileStream.write(content);
fileStream.close();
- let { startServerAsync } = require("sdk/test/httpd");
- let srv = startServerAsync(port, basePath);
+ let srv = httpd.startServerAsync(port, basePath);
test.waitUntilDone();
@@ -39,8 +45,7 @@ exports.testBasicHTTPServer = function(test) {
exports.testDynamicServer = function (test) {
let content = "This is the HTTPD test file.\n";
- let { startServerAsync } = require("sdk/test/httpd");
- let srv = startServerAsync(port);
+ let srv = httpd.startServerAsync(port);
// See documentation here:
//http://doxygen.db48x.net/mozilla/html/interfacensIHttpServer.html#a81fc7e7e29d82aac5ce7d56d0bedfb3a
Please sign in to comment.
Something went wrong with that request. Please try again.