Browse Source

Changed the landing page for the Dromaeo suite - users are now given an option of the set of tests that they can run.

John Resig 16 years ago
parent
commit
3464fe7008
3 changed files with 28 additions and 1 deletions
  1. 6 0
      dep/web/application.css
  2. 13 0
      dep/web/index.html
  3. 9 1
      dep/web/webrunner.js

+ 6 - 0
dep/web/application.css

@@ -102,3 +102,9 @@ h2 { font-size: 20px; border-bottom: 1px solid #AAA; position: relative; padding
 h2 a { color: #FFF; }
 h2 div.bar { font-size: 10px; width: 275px; top: -2px; right: 1%; }
 h2 input { position: absolute; top: 0px; right: 300px; }
+
+ul#tests { clear:both;width:420px;margin:0 auto;text-align:left; padding: 10px; list-style: none; }
+#tests a { font-size: 1.2em; }
+#tests b { background: #c7331d; color: #000; display: block; padding: 4px 0 4px 10px; margin-left: -10px; }
+#tests b a { color: #000; }
+#tests li { padding-left: 10px; padding-bottom: 5px; }

+ 13 - 0
dep/web/index.html

@@ -39,6 +39,19 @@
         <div id="main">
 <div id="info"><span>Mozilla JavaScript performance test suite.</span><br/>More information about <a href="http://wiki.mozilla.org/Dromaeo">Dromaeo</a> can be found on the Mozilla wiki.</div>
 <h1 id="overview" class="test">Performance Tests <input type="button" id="pause" class="pause" value="Loading..."/><div class="bar"><div id="timebar" style="width:25%;"><span class="left">Est.&nbsp;Time:&nbsp;<strong id="left">0:00</strong></span></div></div></h1><br style="clear:both;"/>
+<ul id="tests">
+  <li><b><a href="?all">&raquo; Run All Tests</a></b><br/><br/></li>
+
+  <li><b><a href="?dromaeo|sunspider|v8">&raquo; Run All JavaScript Tests</a></b></li>
+  <li><a href="?dromaeo">Dromaeo JavaScript Tests</a></b><br/>(String, RegExp, Array)</li>
+  <li><a href="?sunspider">SunSpider JavaScript Tests</a><br/>(Math, Bitops, Looping, Functions)</li>
+  <li><a href="?v8">V8 JavaScript Tests</a><br/>(Functions, Strings, Objects)<br/><br/></li>
+
+  <li><b><a href="?dom|jslib|cssquery">&raquo; Run All DOM Tests</a></b></li>
+  <li><a href="?dom">DOM Core Tests</a><br/>(Querying, Traversing, Manipulation, Atributes)</li>
+  <li><a href="?jslib">JavaScript Library Tests</a><br/>(jQuery, Prototype)</li>
+  <li><a href="?cssquery">CSS Selector Tests</a><br/>(jQuery, Prototype, Dojo, Mootools, YUI, ExtJS)</li>
+</ul>
 </div>
 </div>
 </body>

+ 9 - 1
dep/web/webrunner.js

@@ -226,7 +226,8 @@
 	// Query String Parsing
 	var search = (window.location.search || "?").substr(1);
 	var parts = search.split("&");
-	var filter = parts.length && !parts[0].match(/=/) ?
+	var none = !parts[0] || parts[0].match(/=/);
+	var filter = parts.length && !parts[0].match(/=/) && parts[0] !== "all" ?
 		new RegExp(parts.shift(), "i") :
 		/./;
 
@@ -254,6 +255,13 @@
 	jQuery(function(){
 		var id = search.match(/id=([\d,]+)/);
 
+		if ( none ) {
+			$("#overview").hide();
+			return;
+		} 
+
+		$("#tests").hide();
+
 		jQuery.getJSON("tests/MANIFEST.json", function(json){
 			tests = json;