Added start file, moved out of templates.
authorMark Cote <mcote@mozilla.com>
Wed, 31 Aug 2011 16:42:27 -0400
changeset 61 98df7e112516e20817ad5f4dbe80f5f346949c31
parent 60 94d175c236153133c873e8c9454e76e9223cb19a
child 62 f88f4f92a8b46eafb5a0f8f5ad4fafeb89153018
push id59
push usermcote@mozilla.com
push dateWed, 31 Aug 2011 20:42:23 +0000
Added start file, moved out of templates.
html/start.html
new file mode 100644
--- /dev/null
+++ b/html/start.html
@@ -0,0 +1,30 @@
+<html>
+<head>
+  <meta http-equiv="Content-type" content="text/html; charset=utf-8"/>
+  <title>Mozilla SpeedTest Runner</title>
+  <script type="text/javascript" src="js/jquery.min.js"></script>
+  <script type="text/javascript" src="js/speedtests.js"></script>
+</head>
+<body>
+<div id="main">
+<p>
+SpeedTests go!
+</p>
+</div>
+<script>
+$(document).ready(function() {
+  var searchParams = SpeedTests.getSearchParams();
+  if (!searchParams.testUrl) {
+    $('#main p').text('No testUrl parameter given.');
+  } else if (searchParams.test) {
+    var testName = searchParams.testUrl.slice(0, searchParams.testUrl.lastIndexOf('/'));
+    $('#main p').text('TEST submitting results for ' + testName + '...');
+    SpeedTests.nextTest(testName);
+  } else {
+    window.open(searchParams.testUrl + document.location.search, 'testWindow',
+                'resizable=no,status=no,top=0,left=0,height=768,width=1024,menubar=no,toolbar=no,location=no,personalbar=no');
+  }
+});
+</script>
+</body>
+</html>