Thu, 15 Jan 2015 21:03:48 +0100
Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)
michael@0 | 1 | function handleRequest(request, response) |
michael@0 | 2 | { |
michael@0 | 3 | response.setHeader("Cache-Control", "no-cache", false); |
michael@0 | 4 | switch (request.queryString) { |
michael@0 | 5 | case "reset": |
michael@0 | 6 | response.setHeader("Content-Type", "application/ecmascript", false); |
michael@0 | 7 | setState("imageloaded", ""); |
michael@0 | 8 | break; |
michael@0 | 9 | case "image": |
michael@0 | 10 | setState("imageloaded", "imageloaded"); |
michael@0 | 11 | response.setStatusLine("1.1", 302, "Found"); |
michael@0 | 12 | // redirect to a solid blue image |
michael@0 | 13 | response.setHeader("Location", "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAADElEQVQI12NgYPgPAAEDAQDZqt2zAAAAAElFTkSuQmCC"); |
michael@0 | 14 | response.setHeader("Content-Type", "text/plain", false); |
michael@0 | 15 | break; |
michael@0 | 16 | case "result": |
michael@0 | 17 | response.setHeader("Content-Type", "application/ecmascript", false); |
michael@0 | 18 | var state = getState("imageloaded"); |
michael@0 | 19 | response.write("is('" + state + |
michael@0 | 20 | "', '', 'image should not have been loaded')\n"); |
michael@0 | 21 | response.write("SimpleTest.finish()"); |
michael@0 | 22 | break; |
michael@0 | 23 | } |
michael@0 | 24 | } |