Permalink
Browse files

Introduce coremob target dir for generating static HTML.

This directory is used only for static HTML files that are generated using the "grunt generate" command.

To generate static files, use the following commands:

grunt generate

To limit the generation to 1 or more specific tests, use the following:

grunt generate:*:test1:test2:test3

eg.

grunt generate:*:appcache:webworkers

Would generate static files from the appcache and webworkers tests.

Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
  • Loading branch information...
1 parent 666ed8d commit d16ed9fbef9d14f8ada37a00c43b1169079ff767 @rwaldron rwaldron committed May 30, 2012
Showing with 1,873 additions and 0 deletions.
  1. +19 −0 coremob/lib/template.jst
  2. +75 −0 coremob/lib/testharness.css
  3. +1,758 −0 coremob/lib/testharness.js
  4. +17 −0 coremob/lib/testharnessreport.js
  5. +4 −0 coremob/readme.md
View
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta charset="UTF-8" />
+ <title>Coremob Test Development: <%= target %></title>
+ <script src="lib/testharness.js"></script>
+ <script src="lib/testharnessreport.js"></script>
+</head>
+<body>
+<div id="log"></div>
+<div id="testharness-fixture">
+<%= html %>
+</div>
+<script>
+<%= tests %>
+</script>
+
+</body>
+</html>
@@ -0,0 +1,75 @@
+html {
+ font-family:DejaVu Sans, Bitstream Vera Sans, Arial, Sans;
+}
+
+section#summary {
+ margin-bottom:1em;
+}
+
+table#results {
+ border-collapse:collapse;
+ table-layout:fixed;
+ width:100%;
+}
+
+table#results th:first-child,
+table#results td:first-child {
+ width:4em;
+}
+
+table#results th:last-child,
+table#results td:last-child {
+ width:50%;
+}
+
+table#results th {
+ padding:0;
+ padding-bottom:0.5em;
+ border-bottom:medium solid black;
+}
+
+table#results td {
+ padding:1em;
+ padding-bottom:0.5em;
+ border-bottom:thin solid black;
+}
+
+tr.pass > td:first-child {
+ color:green;
+}
+
+tr.fail > td:first-child {
+ color:red;
+}
+
+tr.timeout > td:first-child {
+ color:red;
+}
+
+tr.notrun > td:first-child {
+ color:blue;
+}
+
+.pass .fail .timeout .notrun > td:first-child {
+ font-variant:small-caps;
+}
+
+table#results span {
+ display:block;
+}
+
+table#results span.expected {
+ font-family:DejaVu Sans Mono, Bitstream Vera Sans Mono, Monospace;
+ white-space:pre;
+}
+
+table#results span.actual {
+ font-family:DejaVu Sans Mono, Bitstream Vera Sans Mono, Monospace;
+ white-space:pre;
+}
+
+#testharness-fixture {
+ position: absolute;
+ top: -10000px;
+ left: -10000px;
+}
Oops, something went wrong.

0 comments on commit d16ed9f

Please sign in to comment.