Author: nextgens
Date: 2006-11-03 13:29:54 +0000 (Fri, 03 Nov 2006)
New Revision: 10804

Modified:
   trunk/freenet/src/freenet/clients/http/BrowserTestToadlet.java
Log:
New, improved version of the Javascript test on /test/ ... I NEED to implement 
a way of sending not-encoded HTML :/

Modified: trunk/freenet/src/freenet/clients/http/BrowserTestToadlet.java
===================================================================
--- trunk/freenet/src/freenet/clients/http/BrowserTestToadlet.java      
2006-11-03 12:48:27 UTC (rev 10803)
+++ trunk/freenet/src/freenet/clients/http/BrowserTestToadlet.java      
2006-11-03 13:29:54 UTC (rev 10804)
@@ -46,7 +46,8 @@
                HTMLNode jsTestBox = 
contentNode.addChild(ctx.getPageMaker().getInfobox("infobox-warning", 
"Javascript"));
                HTMLNode jsTestContent= 
ctx.getPageMaker().getContentNode(jsTestBox);
                HTMLNode jsTest = jsTestContent.addChild("div");
-               jsTest.addChild("script", "language", "javascript", 
"document.write('Your browser has JavaScript support enabled: it's not 
necessary to run freenet and should be disabled.');");
+               jsTest.addChild("img", new String[]{"id", "src", "alt"}, new 
String[]{"JSTEST", "/static/themes/clean/success.gif", "fail!"});
+               jsTest.addChild("script", "language", "javascript", 
"document.getElementById('JSTEST').src = '/static/themes/clean/warning.gif'");

                this.writeReply(ctx, 200, "text/html", "OK", 
pageNode.generate());
        }


Reply via email to