From 4a9e3a6dc3bfbc885730cfec7b2f1c147d179cc1 Mon Sep 17 00:00:00 2001 From: Maksymilian Osowski Date: Fri, 30 Jul 2010 17:11:32 +0100 Subject: [PATCH] Added detecting unimplemented layoutTestController functions and green squares. Change-Id: Iaa7bbdb83a074a874a210f7975c6c3b731e0a924 --- .../android/dumprendertree2/Summarizer.java | 31 +++++++++++++++++-- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/tests/DumpRenderTree2/src/com/android/dumprendertree2/Summarizer.java b/tests/DumpRenderTree2/src/com/android/dumprendertree2/Summarizer.java index fa01c74c04d58..56822f34160b0 100644 --- a/tests/DumpRenderTree2/src/com/android/dumprendertree2/Summarizer.java +++ b/tests/DumpRenderTree2/src/com/android/dumprendertree2/Summarizer.java @@ -21,7 +21,9 @@ import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Collections; import java.util.Date; +import java.util.HashSet; import java.util.List; +import java.util.Set; /** * A class that collects information about tests that ran and can create HTML @@ -55,7 +57,14 @@ public class Summarizer { "h3 a span.path {" + " text-decoration: underline;}" + "h3 span.tri {" + - " text-decoration: none;}" + + " text-decoration: none;" + + " float: left;" + + " width: 20px;}" + + "h3 span.sqr {" + + " text-decoration: none;" + + " color: #8ee100;" + + " float: left;" + + " width: 20px;}" + "h3 img {" + " width: 8px;" + " margin-right: 4px;}" + @@ -135,6 +144,9 @@ public class Summarizer { "span." + AbstractResult.ResultCode.FAIL_CRASHED.name() + "{" + " background-color: #c30000;" + " color: #fff;}" + + "span.noLtc {" + + " background-color: #944000;" + + " color: #fff;" + ""; private static final String SCRIPT = @@ -244,7 +256,8 @@ public class Summarizer { html.append("

"); if (resultCode == AbstractResult.ResultCode.PASS) { - html.append(relativePath); + html.append(""); + html.append("" + relativePath + ""); } else { /** * Technically, two different paths could end up being the same, because @@ -263,6 +276,15 @@ public class Summarizer { html.append(resultCode.toString()); html.append(""); + /** Detect missing LTC function */ + String additionalTextOutputString = result.getAdditionalTextOutputString(); + if (additionalTextOutputString != null && + additionalTextOutputString.contains("com.android.dumprendertree") && + additionalTextOutputString.contains("LayoutTestController") && + additionalTextOutputString.contains("has no method")) { + html.append(" LTC function missing"); + } + html.append("

"); if (resultCode != AbstractResult.ResultCode.PASS) { @@ -282,7 +304,10 @@ public class Summarizer { Collections.sort(resultsList); html.append("

Passed [" + resultsList.size() + "]

"); for (String result : resultsList) { - html.append("

" + result + "

"); + html.append("

"); + html.append(""); + html.append("" + result + ""); + html.append("

"); html.append("
"); } }