]> khamidou — GitHub mirrors - popcorn-js.git/commitdiff
updated to 0.4
authorDan Ventura <distraction.attack@gmail.com>
Tue, 8 Mar 2011 22:04:42 +0000 (17:04 -0500)
committerDan Ventura <distraction.attack@gmail.com>
Tue, 8 Mar 2011 22:04:42 +0000 (17:04 -0500)
plugins/index.html [new file with mode: 0644]

diff --git a/plugins/index.html b/plugins/index.html
new file mode 100644 (file)
index 0000000..005bfc6
--- /dev/null
@@ -0,0 +1,58 @@
+<!DOCTYPE>
+<html>
+<head>
+  <title>Popcorn Plug-in Unit Tests</title>  
+</head>
+<body onload="runAllTests();">
+  <div style="position:absolute;top:0px;left:0px;width:150px;height:100%">
+    <h1>Popcorn Plug-in Unit Tests</h1>
+    <button type="button" onclick="runAllTests();">Run all Tests</button>
+    <ul id="menuItems">
+      <li><a onclick="clearEvents();" target="out" href="attribution/popcorn.attribution.unit.html">attribution</a></li>
+      <li><a onclick="clearEvents();" target="out" href="flickr/popcorn.flickr.unit.html">flickr</a></li>
+      <li><a onclick="clearEvents();" target="out" href="footnote/popcorn.footnote.unit.html">footnote</a></li>
+      <li><a onclick="clearEvents();" target="out" href="googlemap/popcorn.googlemap.unit.html">googlemap</a></li>
+      <li><a onclick="clearEvents();" target="out" href="googlenews/popcorn.googlenews.unit.html">googlenews</a></li>
+      <li><a onclick="clearEvents();" target="out" href="image/popcorn.image.unit.html">image</a></li>
+      <li><a onclick="clearEvents();" target="out" href="lowerthird/popcorn.lowerthird.unit.html">lowerthird</a></li>
+      <li><a onclick="clearEvents();" target="out" href="subtitle/popcorn.subtitle.unit.html">subtitle</a></li>
+      <li><a onclick="clearEvents();" target="out" href="tagthisperson/popcorn.tagthisperson.unit.html">tagthisperson</a></li>
+      <li><a onclick="clearEvents();" target="out" href="twitter/popcorn.twitter.unit.html">twitter</a></li>
+      <li><a onclick="clearEvents();" target="out" href="webpage/popcorn.webpage.unit.html">webpage</a></li>
+      <li><a onclick="clearEvents();" target="out" href="wikipedia/popcorn.wikipedia.unit.html">wikipedia</a></li>
+    </ul>
+  </div>
+  <iframe id="out" name="out" style="position:absolute;top:0px;left:150px;height:100%;width:100%"></iframe>
+  <script>
+  var eventList = [];
+  function runAllTests(){
+    var testUrl = [ "attribution", "flickr", "footnote", "googlemap", 
+                    "googlenews", "image", "lowerthird", "subtitle", 
+                    "tagthisperson", "twitter", "webpage", "wikipedia" ];
+    //googlenews and lowerthird tests do not exist, therefore their test time is set to 0
+    var testDur = [ 15000, 10000, 20000, 10000, 0, 10000, 
+                    0, 25000, 15000, 10000, 20000, 15000 ];
+    
+    var setTest = function( index ) {
+      var url = function( str ) {
+        return str + "/popcorn." + str + ".unit.html";
+      };
+      document.getElementById('out').src = url( testUrl[ index ] );
+    };
+      
+    for ( var i = 0, delay = 0; i < 10; delay += testDur[i], i++ ) {
+      (function ( j ) {
+        eventList[j] = setTimeout(function() {
+          setTest( j );
+        }, delay);
+      })( i );
+    }
+  }
+  function clearEvents(){
+    for( x in eventList ) {
+      clearTimeout( x );
+    }
+  }
+  </script>
+</body>
+</html>
\ No newline at end of file