<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="code/popcorn.code.unit.html">code</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="lastfm/popcorn.lastfm.unit.html">lastfm</a></li>
<li><a onclick="clearEvents();" target="out" href="lowerthird/popcorn.lowerthird.unit.html">lowerthird</a></li>
+ <li><a onclick="clearEvents();" target="out" href="mustache/popcorn.mustache.unit.html">mustache</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>
<script>
var eventList = [];
function runAllTests(){
- var testUrl = [ "attribution", "flickr", "footnote", "googlemap",
- "googlenews", "image", "lowerthird", "subtitle",
- "tagthisperson", "twitter", "webpage", "wikipedia" ];
+ var testUrl = [ "attribution", "code", "flickr", "footnote", "googlemap",
+ "googlenews", "image", "lastfm", "lowerthird", "mustache",
+ "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 testDur = [ 17000, 20000, 10000, 20000, 11000,
+ 0, 10000, 10000, 0, 15000,
+ 25000, 21000, 10000, 21000, 21000 ];
var setTest = function( index ) {
var url = function( str ) {
document.getElementById('out').src = url( testUrl[ index ] );
};
- for ( var i = 0, delay = 0; i < 10; delay += testDur[i], i++ ) {
+ for ( var i = 0, delay = 0; i < testUrl.length; delay += testDur[i], i++ ) {
(function ( j ) {
- eventList[j] = setTimeout(function() {
+ var event = setTimeout(function() {
setTest( j );
}, delay);
+ eventList.push(event);
})( i );
}
}
function clearEvents(){
- for( x in eventList ) {
- clearTimeout( x );
+ var len = eventList.length;
+ for( var i = 0; i < len; i++ ) {
+ clearTimeout( eventList[i] );
+ }
+
+ for( var i = 0; i < len; i++ ) {
+ eventList.pop();
}
}
</script>