/* global module, asyncTest, ok, start */

module("forge.httpd");

asyncTest("Test that content is being served via https", 1, function () {
    if (window.location.protocol == "https:") {
        ok(true, "Expected 'https:'");
        start();
    } else {
        ok(false, "Expected 'https:', got: " + window.location.protocol);
        start();
    }
});

asyncTest("Test that content is being served from localhost", 1, function () {
    if (window.location.hostname == "toolkit-local.com") {
        ok(true, "Expected 'toolkit-local.com'");
        start();
    } else {
        ok(false, "Expected 'toolkit-local.com', got: " + window.location.hostname);
        start();
    }
});

@@ -31,16 +31,26 @@
 k, start
+, $, forge
  */%0A%0Amod
@@ -479,33 +479,25 @@
 ame == %22
-toolkit-
 local
-.com
+host
 %22) %7B%0A   
@@ -521,33 +521,25 @@
 pected '
-toolkit-
 local
-.com
+host
 '%22);%0A   
@@ -598,78 +598,894 @@
 ed '
-toolkit-local.com', got: %22 + window.location.hostname);%0A        start(
+localhost', got: %22 + window.location.hostname);%0A        start();%0A    %7D%0A%7D);%0A%0Avar numrequests = 512;%0A%0AasyncTest(%22Test that we can make a lot of requests%22, numrequests, function () %7B%0A    var url = window.location.protocol + %22//%22 +%0A              window.location.host + %22/src/fixtures/httpd/icon-512.png%22;%0A    forge.logging.log(%22Using url: %22 + url);%0A    var count = 0;%0A    var options = %7B%0A        url: url,%0A        success: function () %7B%0A            count++;%0A            ok(true);%0A            if (count === numrequests) %7B%0A                start();%0A            %7D%0A        %7D,%0A        error: function (error) %7B%0A            count++;%0A            ok(false, %22Error: %22 + JSON.stringify(error));%0A            if (count === numrequests) %7B%0A                start();%0A            %7D%0A        %7D%0A    %7D;%0A    for (var i = 0; i %3C numrequests; i++) %7B%0A        options.url = url + %22?count=%22 + i;%0A        $.ajax(options
 );%0A 

Add a simple stress test to the unit tests