Return-Path: Delivered-To: apmail-sling-commits-archive@www.apache.org Received: (qmail 71165 invoked from network); 4 Feb 2011 15:42:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 4 Feb 2011 15:42:54 -0000 Received: (qmail 64010 invoked by uid 500); 4 Feb 2011 15:42:54 -0000 Delivered-To: apmail-sling-commits-archive@sling.apache.org Received: (qmail 63590 invoked by uid 500); 4 Feb 2011 15:42:51 -0000 Mailing-List: contact commits-help@sling.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@sling.apache.org Delivered-To: mailing list commits@sling.apache.org Received: (qmail 63583 invoked by uid 99); 4 Feb 2011 15:42:50 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Feb 2011 15:42:50 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Feb 2011 15:42:48 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 446DB2388A36; Fri, 4 Feb 2011 15:42:28 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1067200 - in /sling/whiteboard/bdelacretaz/junit/core/src/main: java/org/apache/sling/junit/impl/ java/org/apache/sling/junit/impl/servlet/ resources/ Date: Fri, 04 Feb 2011 15:42:28 -0000 To: commits@sling.apache.org From: bdelacretaz@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110204154228.446DB2388A36@eris.apache.org> Author: bdelacretaz Date: Fri Feb 4 15:42:27 2011 New Revision: 1067200 URL: http://svn.apache.org/viewvc?rev=1067200&view=rev Log: SLING-1963 - basic HTML rendering for test servlet Added: sling/whiteboard/bdelacretaz/junit/core/src/main/java/org/apache/sling/junit/impl/servlet/ sling/whiteboard/bdelacretaz/junit/core/src/main/java/org/apache/sling/junit/impl/servlet/HtmlFilter.java (with props) sling/whiteboard/bdelacretaz/junit/core/src/main/java/org/apache/sling/junit/impl/servlet/HtmlRenderer.java (with props) sling/whiteboard/bdelacretaz/junit/core/src/main/java/org/apache/sling/junit/impl/servlet/JUnitServlet.java - copied, changed from r1067179, sling/whiteboard/bdelacretaz/junit/core/src/main/java/org/apache/sling/junit/impl/JUnitServlet.java sling/whiteboard/bdelacretaz/junit/core/src/main/java/org/apache/sling/junit/impl/servlet/PlainTextRenderer.java - copied, changed from r1067118, sling/whiteboard/bdelacretaz/junit/core/src/main/java/org/apache/sling/junit/impl/PlainTextRunListener.java sling/whiteboard/bdelacretaz/junit/core/src/main/java/org/apache/sling/junit/impl/servlet/Renderer.java (with props) sling/whiteboard/bdelacretaz/junit/core/src/main/java/org/apache/sling/junit/impl/servlet/RequestInfo.java (with props) sling/whiteboard/bdelacretaz/junit/core/src/main/resources/ sling/whiteboard/bdelacretaz/junit/core/src/main/resources/junit.css (with props) Removed: sling/whiteboard/bdelacretaz/junit/core/src/main/java/org/apache/sling/junit/impl/JUnitServlet.java sling/whiteboard/bdelacretaz/junit/core/src/main/java/org/apache/sling/junit/impl/PlainTextRunListener.java Added: sling/whiteboard/bdelacretaz/junit/core/src/main/java/org/apache/sling/junit/impl/servlet/HtmlFilter.java URL: http://svn.apache.org/viewvc/sling/whiteboard/bdelacretaz/junit/core/src/main/java/org/apache/sling/junit/impl/servlet/HtmlFilter.java?rev=1067200&view=auto ============================================================================== --- sling/whiteboard/bdelacretaz/junit/core/src/main/java/org/apache/sling/junit/impl/servlet/HtmlFilter.java (added) +++ sling/whiteboard/bdelacretaz/junit/core/src/main/java/org/apache/sling/junit/impl/servlet/HtmlFilter.java Fri Feb 4 15:42:27 2011 @@ -0,0 +1,37 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.sling.junit.impl.servlet; + +import java.io.PrintWriter; + +/** Simple HTML output filtering */ +public class HtmlFilter { + static void escape(PrintWriter w, String str) { + for(int i=0 ; i < str.length(); i++) { + final char c = str.charAt(i); + if(c == '<') { + w.write("<"); + } else if (c == '>') { + w.write(">"); + } else if(c == '&') { + w.write("&"); + } else { + w.write(c); + } + } + } +} Propchange: sling/whiteboard/bdelacretaz/junit/core/src/main/java/org/apache/sling/junit/impl/servlet/HtmlFilter.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: sling/whiteboard/bdelacretaz/junit/core/src/main/java/org/apache/sling/junit/impl/servlet/HtmlFilter.java ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Rev URL Added: sling/whiteboard/bdelacretaz/junit/core/src/main/java/org/apache/sling/junit/impl/servlet/HtmlRenderer.java URL: http://svn.apache.org/viewvc/sling/whiteboard/bdelacretaz/junit/core/src/main/java/org/apache/sling/junit/impl/servlet/HtmlRenderer.java?rev=1067200&view=auto ============================================================================== --- sling/whiteboard/bdelacretaz/junit/core/src/main/java/org/apache/sling/junit/impl/servlet/HtmlRenderer.java (added) +++ sling/whiteboard/bdelacretaz/junit/core/src/main/java/org/apache/sling/junit/impl/servlet/HtmlRenderer.java Fri Feb 4 15:42:27 2011 @@ -0,0 +1,146 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.sling.junit.impl.servlet; + +import java.io.IOException; +import java.io.PrintWriter; +import java.io.UnsupportedEncodingException; +import java.util.List; + +import javax.servlet.http.HttpServletResponse; + +import org.junit.runner.Description; +import org.junit.runner.Result; +import org.junit.runner.notification.Failure; + +class HtmlRenderer extends Renderer { + + private PrintWriter output; + + public void info(String cssClass, String str) { + output.println("

"); + HtmlFilter.escape(output, str); + output.println("

"); + } + + public void list(String cssClass, List data) { + output.println("
    "); + for(String str : data) { + output.println("
  • "); + HtmlFilter.escape(output, str); + output.println("
  • "); + } + output.println("
"); + } + + public void title(int level, String title) { + output.print(""); + HtmlFilter.escape(output, title); + output.print(""); + } + + public void setup(HttpServletResponse response, String pageTitle) throws IOException, UnsupportedEncodingException { + response.setContentType("text/html"); + response.setCharacterEncoding("UTF-8"); + output = response.getWriter(); + output.println(""); + output.println(""); + output.print(""); + HtmlFilter.escape(output, pageTitle); + output.println(""); + output.println("

"); + HtmlFilter.escape(output, pageTitle); + output.println("

"); + } + + public void cleanup() { + output.println(""); + output.println(""); + } + + @Override + public void testFailure(Failure failure) throws Exception { + super.testFailure(failure); + output.print("

"); + output.print("TEST FAILED: "); + HtmlFilter.escape(output, failure.getTestHeader()); + output.print("

"); + HtmlFilter.escape(output, failure.toString()); + output.println("
"); + } + + @Override + public void testFinished(Description description) throws Exception { + super.testFinished(description); + output.print("

Test finished: "); + HtmlFilter.escape(output, description.toString()); + output.println("

"); + } + + @Override + public void testIgnored(Description description) throws Exception { + super.testIgnored(description); + output.print("

TEST IGNORED

"); + HtmlFilter.escape(output, description.toString()); + output.println("

"); + } + + private void counter(String name, String cssName, int value) { + final String cssClass = cssName + (value > 0 ? "NonZero" : "Zero"); + output.print(""); + HtmlFilter.escape(output, name); + output.print(":"); + HtmlFilter.escape(output, String.valueOf(value)); + output.println(""); + } + + @Override + public void testRunFinished(Result result) throws Exception { + super.testRunFinished(result); + String cssClass = "testRun "; + if(result.getFailureCount() > 0) { + cssClass += "failure"; + } else if(result.getIgnoreCount() > 0) { + cssClass += "ignored"; + } else { + cssClass += "success"; + } + + output.println("

"); + output.print("TEST RUN FINISHED: "); + counter("tests", "testCount", result.getRunCount()); + output.print(", "); + counter("failures", "failureCount", result.getFailureCount()); + output.print(", "); + counter("ignored", "ignoredCount", result.getIgnoreCount()); + output.println("

"); + } + + @Override + public void testRunStarted(Description description) + throws Exception { + super.testRunStarted(description); + } + + @Override + public void testStarted(Description description) throws Exception { + super.testStarted(description); + output.println("
"); + } +} Propchange: sling/whiteboard/bdelacretaz/junit/core/src/main/java/org/apache/sling/junit/impl/servlet/HtmlRenderer.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: sling/whiteboard/bdelacretaz/junit/core/src/main/java/org/apache/sling/junit/impl/servlet/HtmlRenderer.java ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Rev URL Copied: sling/whiteboard/bdelacretaz/junit/core/src/main/java/org/apache/sling/junit/impl/servlet/JUnitServlet.java (from r1067179, sling/whiteboard/bdelacretaz/junit/core/src/main/java/org/apache/sling/junit/impl/JUnitServlet.java) URL: http://svn.apache.org/viewvc/sling/whiteboard/bdelacretaz/junit/core/src/main/java/org/apache/sling/junit/impl/servlet/JUnitServlet.java?p2=sling/whiteboard/bdelacretaz/junit/core/src/main/java/org/apache/sling/junit/impl/servlet/JUnitServlet.java&p1=sling/whiteboard/bdelacretaz/junit/core/src/main/java/org/apache/sling/junit/impl/JUnitServlet.java&r1=1067179&r2=1067200&rev=1067200&view=diff ============================================================================== --- sling/whiteboard/bdelacretaz/junit/core/src/main/java/org/apache/sling/junit/impl/JUnitServlet.java (original) +++ sling/whiteboard/bdelacretaz/junit/core/src/main/java/org/apache/sling/junit/impl/servlet/JUnitServlet.java Fri Feb 4 15:42:27 2011 @@ -14,10 +14,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.sling.junit.impl; +package org.apache.sling.junit.impl.servlet; import java.io.IOException; -import java.io.PrintWriter; +import java.io.InputStream; +import java.io.OutputStream; import java.util.Collection; import java.util.Collections; import java.util.LinkedList; @@ -47,6 +48,8 @@ public class JUnitServlet extends HttpSe private final Logger log = LoggerFactory.getLogger(getClass()); + public static final String CSS = "junit.css"; + /** TODO make this configurable */ public static final String SERVLET_PATH = "/system/sling/junit"; @@ -55,7 +58,7 @@ public class JUnitServlet extends HttpSe @Reference(cardinality=ReferenceCardinality.OPTIONAL_UNARY) private HttpService httpService; - + protected void bindHttpService(HttpService h) throws ServletException, NamespaceException { httpService = h; httpService.registerServlet(SERVLET_PATH, this, null, null); @@ -68,47 +71,97 @@ public class JUnitServlet extends HttpSe log.info("Servlet unregistered from path {}", SERVLET_PATH); } + /** Return the list of available tests + * @param prefix optionally select only names that match this prefix + */ + private List getTestNames(String prefix) { + final Collection testClassesCollection = testsManager.getTestNames(); + final List testClasses = new LinkedList(); + if(prefix == null || prefix.length() == 0) { + testClasses.addAll(testClassesCollection); + } else { + for(String name : testClassesCollection) { + if(name.startsWith(prefix)) { + testClasses.add(name); + } + } + } + Collections.sort(testClasses); + return testClasses; + } + + private Renderer getRenderer(RequestInfo requestInfo) { + if(".txt".equals(requestInfo.extension)) { + return new PlainTextRenderer(); + } else { + return new HtmlRenderer(); + } + } + + private void sendCss(HttpServletResponse response) throws IOException { + final InputStream str = getClass().getResourceAsStream("/" + CSS); + if(str == null) { + response.sendError(HttpServletResponse.SC_NOT_FOUND, CSS); + } else { + response.setContentType("text/css"); + final OutputStream out = response.getOutputStream(); + final byte[] buffer = new byte[16384]; + int count = 0; + while( (count = str.read(buffer)) > 0) { + out.write(buffer, 0, count); + } + out.flush(); + } + } + @Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + { + final String pi = request.getPathInfo(); + if(pi != null && pi.endsWith(CSS)) { + sendCss(response); + return; + } + } - response.setContentType("text/plain"); - response.setCharacterEncoding("UTF-8"); - final PrintWriter pw = response.getWriter(); - pw.println("This is " + getClass().getName()); - pw.println(); + final RequestInfo requestInfo = new RequestInfo(request); + final Renderer renderer = getRenderer(requestInfo); + log.debug("GET request: {}", requestInfo); + + renderer.setup(response, getClass().getSimpleName()); + + if(requestInfo.testSelector.length() > 0) { + renderer.info("info", "Test selector: " + requestInfo.testSelector); + } else { + renderer.info("info", "Test selector is empty: " + + "add class name prefix + extension at the end of the URL to select a subset of tests"); + } // Any test classes? - final Collection testClassesCollection = testsManager.getTestNames(); - final List testClasses = new LinkedList(); - testClasses.addAll(testClassesCollection); - Collections.sort(testClasses); - if(testClasses.isEmpty()) { - pw.println( - "No test classes found, check the requirements of the active " + + final List testNames = getTestNames(requestInfo.testSelector); + if(testNames.isEmpty()) { + renderer.info( + "warning", + "No test classes found with prefix=" + requestInfo.testSelector + + ", check the requirements of the active " + "TestsProvider services for how to supply tests." ); - return; - } - - // List test classes - pw.println("TEST CLASSES"); - for(String className : testClasses) { - pw.println(className); - } - pw.println(); - - // Run tests - final JUnitCore junit = new JUnitCore(); - junit.addListener(new PlainTextRunListener(pw)); - try { - for(String className : testClasses) { - pw.println("**** RUNNING TESTS: " + className); - junit.run(testsManager.getTestClass(className)); - pw.println(); + } else { + renderer.title(2, "Test classes"); + renderer.list("testNames", testNames); + + renderer.title(2, "Running tests"); + final JUnitCore junit = new JUnitCore(); + junit.addListener(renderer); + try { + for(String className : testNames) { + renderer.title(3, className); + junit.run(testsManager.getTestClass(className)); + } + } catch(ClassNotFoundException cnfe) { + throw new ServletException("Test class not found", cnfe); } - } catch(ClassNotFoundException cnfe) { - throw new ServletException("Test class not found", cnfe); } } } \ No newline at end of file Copied: sling/whiteboard/bdelacretaz/junit/core/src/main/java/org/apache/sling/junit/impl/servlet/PlainTextRenderer.java (from r1067118, sling/whiteboard/bdelacretaz/junit/core/src/main/java/org/apache/sling/junit/impl/PlainTextRunListener.java) URL: http://svn.apache.org/viewvc/sling/whiteboard/bdelacretaz/junit/core/src/main/java/org/apache/sling/junit/impl/servlet/PlainTextRenderer.java?p2=sling/whiteboard/bdelacretaz/junit/core/src/main/java/org/apache/sling/junit/impl/servlet/PlainTextRenderer.java&p1=sling/whiteboard/bdelacretaz/junit/core/src/main/java/org/apache/sling/junit/impl/PlainTextRunListener.java&r1=1067118&r2=1067200&rev=1067200&view=diff ============================================================================== --- sling/whiteboard/bdelacretaz/junit/core/src/main/java/org/apache/sling/junit/impl/PlainTextRunListener.java (original) +++ sling/whiteboard/bdelacretaz/junit/core/src/main/java/org/apache/sling/junit/impl/servlet/PlainTextRenderer.java Fri Feb 4 15:42:27 2011 @@ -14,44 +14,69 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.sling.junit.impl; +package org.apache.sling.junit.impl.servlet; +import java.io.IOException; import java.io.PrintWriter; +import java.io.UnsupportedEncodingException; +import java.util.List; + +import javax.servlet.http.HttpServletResponse; import org.junit.runner.Description; import org.junit.runner.Result; import org.junit.runner.notification.Failure; -import org.junit.runner.notification.RunListener; -class PlainTextRunListener extends RunListener { - final PrintWriter pw; +class PlainTextRenderer extends Renderer { + private PrintWriter output; + + public void setup(HttpServletResponse response, String pageTitle) throws IOException, UnsupportedEncodingException { + response.setContentType("text/plain"); + response.setCharacterEncoding("UTF-8"); + output = response.getWriter(); + title(1, pageTitle); + } - PlainTextRunListener(PrintWriter w) { - pw = w; + public void cleanup() { + } + + public void info(String cssClass, String str) { + output.println(str); } + public void list(String cssClass, List data) { + for(String str : data) { + output.println(str); + } + } + + public void title(int level, String title) { + output.print(title); + output.println(" ****"); + } + @Override public void testFailure(Failure failure) throws Exception { super.testFailure(failure); - pw.println("FAILURE " + failure); + output.println("FAILURE " + failure); } @Override public void testFinished(Description description) throws Exception { super.testFinished(description); - pw.println("FINISHED " + description); + output.println("FINISHED " + description); } @Override public void testIgnored(Description description) throws Exception { super.testIgnored(description); - pw.println("IGNORED " + description); + output.println("IGNORED " + description); } @Override public void testRunFinished(Result result) throws Exception { super.testRunFinished(result); - pw.println("TEST RUN FINISHED: " + output.println("TEST RUN FINISHED: " + "tests:" + result.getRunCount() + ", failures:" + result.getFailureCount() + ", ignored:" + result.getIgnoreCount() Added: sling/whiteboard/bdelacretaz/junit/core/src/main/java/org/apache/sling/junit/impl/servlet/Renderer.java URL: http://svn.apache.org/viewvc/sling/whiteboard/bdelacretaz/junit/core/src/main/java/org/apache/sling/junit/impl/servlet/Renderer.java?rev=1067200&view=auto ============================================================================== --- sling/whiteboard/bdelacretaz/junit/core/src/main/java/org/apache/sling/junit/impl/servlet/Renderer.java (added) +++ sling/whiteboard/bdelacretaz/junit/core/src/main/java/org/apache/sling/junit/impl/servlet/Renderer.java Fri Feb 4 15:42:27 2011 @@ -0,0 +1,34 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.sling.junit.impl.servlet; + +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.util.List; + +import javax.servlet.http.HttpServletResponse; + +import org.junit.runner.notification.RunListener; + +/** Renderer for our servlet output */ +abstract class Renderer extends RunListener { + abstract void setup(HttpServletResponse response, String pageTitle) throws IOException, UnsupportedEncodingException; + abstract void cleanup(); + abstract void list(String cssClass, List data); + abstract void info(String cssClass, String info); + abstract void title(int level, String title); +} Propchange: sling/whiteboard/bdelacretaz/junit/core/src/main/java/org/apache/sling/junit/impl/servlet/Renderer.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: sling/whiteboard/bdelacretaz/junit/core/src/main/java/org/apache/sling/junit/impl/servlet/Renderer.java ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Rev URL Added: sling/whiteboard/bdelacretaz/junit/core/src/main/java/org/apache/sling/junit/impl/servlet/RequestInfo.java URL: http://svn.apache.org/viewvc/sling/whiteboard/bdelacretaz/junit/core/src/main/java/org/apache/sling/junit/impl/servlet/RequestInfo.java?rev=1067200&view=auto ============================================================================== --- sling/whiteboard/bdelacretaz/junit/core/src/main/java/org/apache/sling/junit/impl/servlet/RequestInfo.java (added) +++ sling/whiteboard/bdelacretaz/junit/core/src/main/java/org/apache/sling/junit/impl/servlet/RequestInfo.java Fri Feb 4 15:42:27 2011 @@ -0,0 +1,48 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.sling.junit.impl.servlet; + +import javax.servlet.http.HttpServletRequest; + +/** Parse information from a request */ +public class RequestInfo { + final String testSelector; + final String extension; + + RequestInfo(HttpServletRequest request) { + String pathinfo = request.getPathInfo(); + if (pathinfo == null) { + pathinfo = ""; + } else if (pathinfo.startsWith("/")) { + pathinfo = pathinfo.substring(1); + } + + final int pos = pathinfo.lastIndexOf('.'); + if (pos >= 0) { + testSelector = pathinfo.substring(0, pos); + extension = pathinfo.substring(pos); + } else { + testSelector = pathinfo; + extension = ""; + } + } + + public String toString() { + return getClass().getSimpleName() + ", testSelector=[" + testSelector + + "], extension=[" + extension + "]"; + } +} Propchange: sling/whiteboard/bdelacretaz/junit/core/src/main/java/org/apache/sling/junit/impl/servlet/RequestInfo.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: sling/whiteboard/bdelacretaz/junit/core/src/main/java/org/apache/sling/junit/impl/servlet/RequestInfo.java ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision Rev URL Added: sling/whiteboard/bdelacretaz/junit/core/src/main/resources/junit.css URL: http://svn.apache.org/viewvc/sling/whiteboard/bdelacretaz/junit/core/src/main/resources/junit.css?rev=1067200&view=auto ============================================================================== --- sling/whiteboard/bdelacretaz/junit/core/src/main/resources/junit.css (added) +++ sling/whiteboard/bdelacretaz/junit/core/src/main/resources/junit.css Fri Feb 4 15:42:27 2011 @@ -0,0 +1,50 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +body { + font-family: Verdana, Arial, sans-serif; +} + +h1 { + border-bottom: solid red 1px; +} + +h2,h3,h4 { + border-bottom: solid grey 1px; +} + +.failureCountNonZero { + color:red; + font-weight:bold; +} + +.ignoredCountNonZero { + color:red; +} + +.failureDetails { + font-family: Courier New, Courier, monospaced; + margin-left: 1em; + margin-right: 1em; + padding: 1em; + border: solid red 1px; + background-color: #FFFFCC; +} + +.failure h3 { + color:red; +} \ No newline at end of file Propchange: sling/whiteboard/bdelacretaz/junit/core/src/main/resources/junit.css ------------------------------------------------------------------------------ svn:eol-style = native