content/media/test/test_preload_actions.html

Fri, 16 Jan 2015 04:50:19 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Fri, 16 Jan 2015 04:50:19 +0100
branch
TOR_BUG_9701
changeset 13
44a2da4a2ab2
permissions
-rw-r--r--

Replace accessor implementation with direct member state manipulation, by
request https://trac.torproject.org/projects/tor/ticket/9701#comment:32

     1 <!DOCTYPE HTML>
     2 <html>
     3 <!--
     4 https://bugzilla.mozilla.org/show_bug.cgi?id=548523
     5 -->
     6 <head>
     7   <title>Test for Bug 548523</title>
     8   <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
     9   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
    10   <script type="text/javascript" src="manifest.js"></script>
    11 </head>
    12 <body>
    13 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=548523">Mozilla Bug 548523</a>
    14 <p id="display"></p>
    15 <div id="content" style="display: none">
    17 </div>
    18 <!-- <button onClick="SimpleTest.finish();">Finish</button> -->
    19 <div>Tests complete: <span id="log" style="font-size: small;"></span></div>
    20 <pre id="test">
    21 <script type="application/javascript">
    23 /** Test for Bug 548523 **/
    25 var manager = new MediaTestManager;
    27 manager.onFinished = function() {
    28   is(gotLoadEvent, true, "Should not have delayed the load event indefinitely");
    29 };
    31 var test = getPlayableVideo(gSeekTests);
    32 var baseName = test.name;
    33 var gTest = test;
    34 var bogusSrc = "bogus.duh";
    35 var bogusType = "video/bogus";
    36 var gotLoadEvent = false;
    37 var finished = false;
    39 addLoadEvent(function() {gotLoadEvent=true;});
    41 function log(m) {
    42   var l = document.getElementById("log");
    43   l.innerHTML += m;
    44 }
    46 function maybeFinish(v, n) {
    47   if (v._finished) {
    48     return;
    49   }
    50   v._finished = true;
    51   log(n + ",");
    52   removeNodeAndSource(v);
    53   manager.finished(v.token);
    54 }
    56 function filename(uri) {
    57   return uri.substr(uri.lastIndexOf("/")+1);
    58 }
    60 // Every test must have a setup(v) function, and must call maybeFinish() when test is complete.
    61 var tests = [
    62   {
    63     // 1. Add preload:none video with src to document. Load should halt at NETWORK_IDLE and HAVE_NOTHING,
    64     // after receiving a suspend event. Should not receive loaded events until after we call load().
    65     // Note the suspend event is explictly sent by our "stop the load" code, but other tests can't rely
    66     // on it for the preload:metadata case, as there can be multiple suspend events when loading metadata.
    67     suspend:
    68     function(e) {
    69       var v = e.target;
    70       is(v._gotLoadStart, true, "(1) Must get loadstart.");
    71       is(v._gotLoadedMetaData, false, "(1) Must not get loadedmetadata.");
    72       is(v.readyState, v.HAVE_NOTHING, "(1) ReadyState must be HAVE_NOTHING");
    73       // bug 962949
    74       // is(v.networkState, v.NETWORK_IDLE, "(1) NetworkState must be NETWORK_IDLE");
    75       maybeFinish(v, 1);
    76     },
    78     setup:
    79     function(v) {
    80       v._gotLoadStart = false;
    81       v._gotLoadedMetaData = false;
    82       v.preload = "none";
    83       v.addEventListener("loadedmetadata", function(e){v._gotLoadedMetaData = true;}, false);
    84       v.addEventListener("loadstart", function(e){v._gotLoadStart = true;}, false);
    85       v.addEventListener("suspend", this.suspend, false);
    86       v.src = test.name;
    87       document.body.appendChild(v); // Causes implicit load, which will be halted due to preload:none.
    88     },
    90     name: "test1",
    91   },
    92   {
    93     // 2. Add preload:metadata video with src to document. Should halt with NETWORK_IDLE, HAVE_CURRENT_DATA
    94     // after suspend event and after loadedmetadata.
    95     loadeddata:
    96     function(e) {
    97       var v = e.target;
    98       is(v._gotLoadStart, true, "(2) Must get loadstart.");
    99       is(v._gotLoadedMetaData, true, "(2) Must get loadedmetadata.");
   100       ok(v.readyState >= v.HAVE_CURRENT_DATA, "(2) ReadyState must be >= HAVE_CURRENT_DATA");
   101       // bug 962949
   102       // is(v.networkState, v.NETWORK_IDLE, "(2) NetworkState must be NETWORK_IDLE");
   103       maybeFinish(v, 2);
   104     },
   106     setup:
   107     function(v) {
   108       v._gotLoadStart = false;
   109       v._gotLoadedMetaData = false;
   110       v.preload = "metadata";
   111       v.addEventListener("loadstart", function(e){v._gotLoadStart = true;}, false);
   112       v.addEventListener("loadedmetadata", function(e){v._gotLoadedMetaData = true;}, false);
   113       v.addEventListener("loadeddata", this.loadeddata, false);
   114       v.src = test.name;
   115       document.body.appendChild(v); // Causes implicit load, which will be halted after
   116                                      // metadata due to preload:metadata.
   117     },
   119     name: "test2",
   120   },
   121   {
   122     // 3. Add preload:auto to document. Should receive canplaythrough eventually.
   123     canplaythrough:
   124     function(e) {
   125       var v = e.target;
   126       is(v._gotLoadStart, true, "(3) Must get loadstart.");
   127       is(v._gotLoadedMetaData, true, "(3) Must get loadedmetadata.");
   128       maybeFinish(v, 3);
   129     },
   131     setup:
   132     function(v) {
   133       v._gotLoadStart = false;
   134       v._gotLoadedMetaData = false;
   135       v.preload = "auto";
   136       v.addEventListener("loadstart", function(e){v._gotLoadStart = true;}, false);
   137       v.addEventListener("loadedmetadata", function(e){v._gotLoadedMetaData = true;}, false);
   138       v.addEventListener("canplaythrough", this.canplaythrough, false);
   139       v.src = test.name; // Causes implicit load.
   140       document.body.appendChild(v);
   141     },
   143     name: "test3",
   144   },
   145   {
   146     // 4. Add preload:none video to document. Call play(), should load then play through.
   147     suspend:
   148     function(e) {
   149       var v = e.target;
   150       if (v._gotSuspend) {
   151         return; // We can receive multiple suspend events, like the one after download completes.
   152       }
   153       v._gotSuspend = true;
   154       is(v._gotLoadStart, true, "(4) Must get loadstart.");
   155       is(v._gotLoadedMetaData, false, "(4) Must not get loadedmetadata.");
   156       is(v.readyState, v.HAVE_NOTHING, "(4) ReadyState must be HAVE_NOTHING");
   157       // bug 962949
   158       // is(v.networkState, v.NETWORK_IDLE, "(4) NetworkState must be NETWORK_IDLE");
   159       v.play(); // Should load and play through.
   160     },
   162     ended:
   163     function(e) {
   164       ok(true, "(4) Got playback ended");
   165       maybeFinish(e.target, 4);
   166     },
   168     setup:
   169     function(v) {
   170       v._gotLoadStart = false;
   171       v._gotLoadedMetaData = false;
   172       v._gotSuspend = false;
   173       v.preload = "none";
   174       v.addEventListener("loadedmetadata", function(e){v._gotLoadedMetaData = true;}, false);
   175       v.addEventListener("loadstart", function(e){v._gotLoadStart = true;}, false);
   176       v.addEventListener("suspend", this.suspend, false);
   177       v.addEventListener("ended", this.ended, false);
   178       v.src = test.name;
   179       document.body.appendChild(v);
   180     },
   182     name: "test4",
   183   },
   184   {
   185     // 5. preload:none video without resource, add to document, will implicitly start a
   186     // preload:none load. Add a src, it shouldn't load.
   187     suspend:
   188     function(e) {
   189       var v = e.target;
   190       is(v._gotLoadStart, true, "(5) Must get loadstart.");
   191       is(v._gotLoadedMetaData, false, "(5) Must not get loadedmetadata.");
   192       is(v.readyState, v.HAVE_NOTHING, "(5) ReadyState must be HAVE_NOTHING");
   193       // bug 962949
   194       // is(v.networkState, v.NETWORK_IDLE, "(5) NetworkState must be NETWORK_IDLE");
   195       maybeFinish(v, 5);
   196     },
   198     setup:
   199     function(v) {
   200       v._gotLoadStart = false;
   201       v._gotLoadedMetaData = false;
   202       v.preload = "none";
   203       v.addEventListener("loadedmetadata", function(e){v._gotLoadedMetaData = true;}, false);
   204       v.addEventListener("loadstart", function(e){v._gotLoadStart = true;}, false);
   205       v.addEventListener("suspend", this.suspend, false);
   206       document.body.appendChild(v); // Causes implicit load, which will be halted due to no resource.
   207       v.src = test.name; // Load should start, and halt at preload:none.
   208     },
   210     name: "test5",
   211   },
   212   {
   213     // 6. preload:none video without resource, add to document, will implicitly start a
   214     // preload:none load. Add a source, it shouldn't load.
   215     suspend:
   216     function(e) {
   217       var v = e.target;
   218       is(v._gotLoadStart, true, "(6) Must get loadstart.");
   219       is(v._gotLoadedMetaData, false, "(6) Must not get loadedmetadata.");
   220       is(v.readyState, v.HAVE_NOTHING, "(6) ReadyState must be HAVE_NOTHING");
   221       // bug 962949
   222       // is(v.networkState, v.NETWORK_IDLE, "(6) NetworkState must be NETWORK_IDLE");
   223       maybeFinish(v, 6);
   224     },
   226     setup:
   227     function(v) {
   228       v._gotLoadStart = false;
   229       v._gotLoadedMetaData = false;
   230       v.preload = "none";
   231       v.addEventListener("loadedmetadata", function(e){v._gotLoadedMetaData = true;}, false);
   232       v.addEventListener("loadstart", function(e){v._gotLoadStart = true;}, false);
   233       v.addEventListener("suspend", this.suspend, false);
   234       document.body.appendChild(v); // Causes implicit load, which will be halted due to no resource.
   235       var s = document.createElement("source");
   236       s.src = test.name;
   237       s.type = test.type;
   238       v.appendChild(s); // Load should start, and halt at preload:none.
   239     },
   241     name: "test6",
   242   },
   243   {
   244     // 7. create a preload:none document with multiple sources, the first of which is invalid.
   245     // Add to document, then play. It should load and play through the second source.
   246     suspend:
   247     function(e) {
   248       var v = e.target;
   249       if (v._gotSuspend) 
   250         return; // We can receive multiple suspend events, like the one after download completes.
   251       v._gotSuspend = true;
   252       is(v._gotLoadStart, true, "(7) Must get loadstart.");
   253       is(v._gotLoadedMetaData, false, "(7) Must not get loadedmetadata.");
   254       is(v.readyState, v.HAVE_NOTHING, "(7) ReadyState must be HAVE_NOTHING");
   255       // bug 962949
   256       // is(v.networkState, v.NETWORK_IDLE, "(7) NetworkState must be NETWORK_IDLE");
   257       v.play(); // Should load and play through.
   258     },
   260     ended:
   261     function(e) {
   262       ok(true, "(7) Got playback ended");
   263       var v = e.target;
   264       is(v._gotErrorEvent, true, "(7) Should get error event from first source load failure");      
   265       maybeFinish(v, 7);
   266     },
   268     setup:
   269     function(v) {
   270       v._gotLoadStart = false;
   271       v._gotLoadedMetaData = false;
   272       v.preload = "none";
   273       v._gotErrorEvent = false;
   274       v.addEventListener("loadedmetadata", function(e){v._gotLoadedMetaData = true;}, false);
   275       v.addEventListener("loadstart", function(e){v._gotLoadStart = true;}, false);
   276       v.addEventListener("suspend", this.suspend, false);
   277       v.addEventListener("ended", this.ended, false);
   278       var s1 = document.createElement("source");
   279       s1.src = "not-a-real-file.404"
   280       s1.type = test.type;
   281       s1.addEventListener("error", function(e){v._gotErrorEvent = true;}, false);
   282       v.appendChild(s1);
   283       var s2 = document.createElement("source");
   284       s2.src = test.name;
   285       s2.type = test.type;
   286       v.appendChild(s2);
   287       document.body.appendChild(v); // Causes implicit load, which will be halt at preload:none on the second resource.
   288     },
   290     name: "test7",
   291   },
   292   {
   293     // 8. Change preload value from none to metadata should cause metadata to be loaded.
   294     loadeddata:
   295     function(e) {
   296       var v = e.target;
   297       is(v._gotLoadedMetaData, true, "(8) Must get loadedmetadata.");
   298       ok(v.readyState >= v.HAVE_CURRENT_DATA, "(8) ReadyState must be >= HAVE_CURRENT_DATA on suspend.");
   299       // bug 962949
   300       // is(v.networkState, v.NETWORK_IDLE, "(8) NetworkState must be NETWORK_IDLE when load is halted");
   301       maybeFinish(v, 8);
   302     },
   304     setup:
   305     function(v) {
   306       v._gotLoadedMetaData = false;
   307       v.preload = "none";
   308       v.addEventListener("loadstart", function(e){v.preload = "metadata";}, false);
   309       v.addEventListener("loadedmetadata", function(e){v._gotLoadedMetaData = true;}, false);
   310       v.addEventListener("loadeddata", this.loadeddata, false);
   311       v.src = test.name; // Causes implicit load.
   312       document.body.appendChild(v);
   313     },
   315     name: "test8",
   316   },
   317   /*{
   318     // 9. Change preload value from metadata to auto should cause entire media to be loaded.
   319     // For some reason we don't always receive the canplaythrough event, particuarly on this test.
   320     // We've disabled this test until bug 568402 is fixed.
   321     canplaythrough:
   322     function(e) {
   323       var v = e.target;
   324       is(v._gotLoadStart, true, "(9) Must get loadstart.");
   325       is(v._gotLoadedMetaData, true, "(9) Must get loadedmetadata.");
   326       maybeFinish(v, 9);
   327     },
   329     setup:
   330     function(v) {
   331       v._gotLoadStart = false;
   332       v._gotLoadedMetaData = false;
   333       v.preload = "metadata";
   334       v.addEventListener("loadstart", function(e){v._gotLoadStart = true;}, false);
   335       v.addEventListener("loadedmetadata", function(e){v._gotLoadedMetaData = true;}, false);
   336       v.addEventListener("loadeddata", function(){v.preload = "auto"}, false);
   337       v.addEventListener("canplaythrough", this.canplaythrough, false);
   338       v.src = test.name; // Causes implicit load.
   339       document.body.appendChild(v);
   340     },
   341   },*/
   342   {
   343     // 10. Change preload value from none to auto should cause entire media to be loaded.
   344     canplaythrough:
   345     function(e) {
   346       var v = e.target;
   347       is(v._gotLoadedMetaData, true, "(10) Must get loadedmetadata.");
   348       maybeFinish(v, 10);
   349     },
   351     setup:
   352     function(v) {
   353       v._gotLoadedMetaData = false;
   354       v.preload = "none";
   355       v.addEventListener("loadstart", function(e){v.preload = "auto";}, false);
   356       v.addEventListener("loadedmetadata", function(e){v._gotLoadedMetaData = true;}, false);
   357       v.addEventListener("canplaythrough", this.canplaythrough, false);
   358       v.src = test.name; // Causes implicit load.
   359       document.body.appendChild(v);
   360     },
   362     name: "test10",
   363   },
   364   {
   365     // 11. Change preload value from none to metadata should cause metadata to load.
   366     loadeddata:
   367     function(e) {
   368       var v = e.target;
   369       is(v._gotLoadedMetaData, true, "(11) Must get loadedmetadata.");
   370       ok(v.readyState >= v.HAVE_CURRENT_DATA, "(11) ReadyState must be >= HAVE_CURRENT_DATA.");
   371       // bug 962949
   372       // is(v.networkState, v.NETWORK_IDLE, "(11) NetworkState must be NETWORK_IDLE.");
   373       maybeFinish(v, 11);
   374     },
   376     setup:
   377     function(v) {
   378       v._gotLoadedMetaData = false;
   379       v.preload = "none";
   380       v.addEventListener("loadstart", function(e){v.preload = "metadata";}, false);
   381       v.addEventListener("loadedmetadata", function(e){v._gotLoadedMetaData = true;}, false);
   382       v.addEventListener("loadeddata", this.loadeddata, false);
   383       v.src = test.name; // Causes implicit load.
   384       document.body.appendChild(v);
   385     },
   387     name: "test11",
   388   },
   389   /*{
   390     // 12. Change preload value from auto to metadata after load started,
   391     // should still do full load, should not halt after metadata only.
   392     // disable this test since the spec is no longer found in the document
   393     // http://dev.w3.org/html5/spec-preview/media-elements.html
   394     canplaythrough:
   395     function(e) {
   396       var v = e.target;
   397       is(v._gotLoadedMetaData, true, "(12) Must get loadedmetadata.");
   398       is(v._gotLoadStart, true, "(12) Must get loadstart.");
   399       maybeFinish(v, 12);
   400     },
   402     setup:
   403     function(v) {
   404       v._gotLoadStart = false;
   405       v._gotLoadedMetaData = false;
   406       v.preload = "auto";
   407       v.addEventListener("loadstart", function(e){v._gotLoadStart = true;}, false);
   408       v.addEventListener("loadedmetadata", function(e){v._gotLoadedMetaData = true;}, false);
   409       v.addEventListener("canplaythrough", this.canplaythrough, false);
   410       v.src = test.name; // Causes implicit load.
   411       document.body.appendChild(v);
   412       v.preload = "metadata";
   413     },
   415     name: "test12",
   416   },*/
   417   {
   418     // 13. Change preload value from auto to none after specifying a src
   419     // should load according to preload none, no buffering should have taken place
   420     suspend:
   421     function(e) {
   422       var v = e.target;
   423       is(v._gotLoadStart, true, "(13) Must get loadstart.");
   424       is(v._gotLoadedMetaData, false, "(13) Must not get loadedmetadata.");
   425       is(v.readyState, v.HAVE_NOTHING, "(13) ReadyState must be HAVE_NOTHING");
   426       // bug 962949
   427       // is(v.networkState, v.NETWORK_IDLE, "(13) NetworkState must be NETWORK_IDLE");
   428       maybeFinish(v, 13);
   429     },
   431     setup:
   432     function(v) {
   433       v._gotLoadStart = false;
   434       v._gotLoadedMetaData = false;
   435       v.preload = "auto";
   436       v.src = test.name;
   437       v.preload = "none";
   438       v.addEventListener("loadedmetadata", function(e){v._gotLoadedMetaData = true;}, false);
   439       v.addEventListener("loadstart", function(e){v._gotLoadStart = true;}, false);
   440       v.addEventListener("suspend", this.suspend, false);
   441       document.body.appendChild(v); // Causes implicit load, should load according to preload none
   442       var s = document.createElement("source");
   443     },
   445     name: "test13",
   446   },
   447   {
   448     // 14. Add preload:metadata video with src to document. Play(), should play through.
   449     loadeddata:
   450     function(e) {
   451       var v = e.target;
   452       is(v._gotLoadStart, true, "(14) Must get loadstart.");
   453       is(v._gotLoadedMetaData, true, "(14) Must get loadedmetadata.");
   454       ok(v.readyState >= v.HAVE_CURRENT_DATA, "(14) ReadyState must be >= HAVE_CURRENT_DATA");
   455       // bug 962949
   456       // is(v.networkState, v.NETWORK_IDLE, "(14) NetworkState must be NETWORK_IDLE");
   457       v.play();
   458     },
   460     ended:
   461     function(e) {
   462       ok(true, "(14) Got playback ended");
   463       var v = e.target;
   464       maybeFinish(v, 14);
   465     },
   467     setup:
   468     function(v) {
   469       v._gotLoadStart = false;
   470       v._gotLoadedMetaData = false;
   471       v.preload = "metadata";
   472       v.addEventListener("loadstart", function(e){v._gotLoadStart = true;}, false);
   473       v.addEventListener("loadedmetadata", function(e){v._gotLoadedMetaData = true;}, false);
   474       v.addEventListener("ended", this.ended, false);
   475       v.addEventListener("loadeddata", this.loadeddata, false);
   476       v.src = test.name;
   477       document.body.appendChild(v); // Causes implicit load, which will be halted after
   478                                      // metadata due to preload:metadata.
   479     },
   481     name: "test14",
   482   },
   483   {
   484     // 15. Autoplay should override preload:none.
   485     ended:
   486     function(e) {
   487       ok(true, "(15) Got playback ended.");
   488       var v = e.target;
   489       maybeFinish(v, 15);
   490     },
   492     setup:
   493     function(v) {
   494       v._gotLoadStart = false;
   495       v._gotLoadedMetaData = false;
   496       v.preload = "none";
   497       v.autoplay = true;
   498       v.addEventListener("loadstart", function(e){v._gotLoadStart = true;}, false);
   499       v.addEventListener("loadedmetadata", function(e){v._gotLoadedMetaData = true;}, false);
   500       v.addEventListener("ended", this.ended, false);
   501       v.src = test.name; // Causes implicit load.
   502       document.body.appendChild(v);
   503     },
   505     name: "test15",
   506   },
   507   {
   508     // 16. Autoplay should override preload:metadata.
   509     ended:
   510     function(e) {
   511       ok(true, "(16) Got playback ended.");
   512       var v = e.target;
   513       maybeFinish(v, 16);
   514     },
   516     setup:
   517     function(v) {
   518       v.preload = "metadata";
   519       v.autoplay = true;
   520       v.addEventListener("ended", this.ended, false);
   521       v.src = test.name; // Causes implicit load.
   522       document.body.appendChild(v);
   523     },
   525     name: "test16",
   526   },
   527   {
   528     // 17. On a preload:none video, adding autoplay should disable preload none, i.e. don't break autoplay!
   529     ended:
   530     function(e) {
   531       ok(true, "(17) Got playback ended.");
   532       var v = e.target;
   533       maybeFinish(v, 17);
   534     },
   536     setup:
   537     function(v) {
   538       v.addEventListener("ended", this.ended, false);
   539       v.preload = "none";
   540       document.body.appendChild(v); // Causes implicit load, which will be halted due to preload:none.
   541       v.autoplay = true;
   542       v.src = test.name;
   543     },
   545     name: "test17",
   546   },
   547   {
   548     // 18. On a preload='none' video, call play() before load algorithms's sync
   549     // has run, the play() call should override preload='none'.
   550     ended:
   551     function(e) {
   552       ok(true, "(18) Got playback ended.");
   553       var v = e.target;
   554       maybeFinish(v, 18);
   555     },
   557     setup:
   558     function(v) {
   559       v.addEventListener("ended", this.ended, false);
   560       v.preload = "none";
   561       v.src = test.name; // Schedules async section to continue load algorithm.
   562       document.body.appendChild(v);
   563       v.play(); // Should cause preload:none to be overridden.
   564     },
   566     name: "test18",
   567   },
   568   {
   569     // 19. Set preload='auto' on first video source then switching preload='none' and swapping the video source to another.
   570     // The second video should not start playing as it's preload state has been changed to 'none' from 'auto'
   571     loadedmetadata: function(e) {
   572       var v = e.target;
   573       is(v.preload === "auto", true, "(19) preload is initially auto");
   574       setTimeout(function() {
   575         // set preload state to none and switch video sources
   576         v.preload="none";
   577         v.src = test.name + "?asdf";
   578         setTimeout(function() {
   579           is(v.readyState === 0, true, "(19) no buffering has taken place");
   580           maybeFinish(v, 19);
   581         }, 2000);
   582       }, 2000);
   584     },
   586     setup:
   587     function(v) {
   588       var that = this;
   589       v.preload = "auto";
   590       v.src = test.name;
   591       // add a listener for when the video has loaded, so we know preload auto has worked
   592       v.addEventListener( "loadedmetadata", this.loadedmetadata, false);
   593       document.body.appendChild(v);
   594     },
   596     name: "test19",
   597   }
   598 ];
   600 var iterationCount = 0;
   601 function startTest(test, token) {
   602   if (test == tests[0]) {
   603     ++iterationCount;
   604     info("iterationCount=" + iterationCount);
   605   }
   606   if (iterationCount == 2) {
   607     // Do this series of tests on logically different resources
   608     test.name = baseName + "?" + Math.floor(Math.random()*100000);
   609   }
   610   var v = document.createElement("video");
   611   v.token = token;
   612   test.setup(v);
   613   manager.started(token);
   614 }
   616 var twiceTests = tests.concat(tests);
   617 SimpleTest.waitForExplicitFinish();
   618 SpecialPowers.pushPrefEnv({"set": [["media.cache_size", 40000]]}, beginTest);
   619 function beginTest() {
   620   manager.runTests(twiceTests, startTest);
   621 }
   622 </script>
   623 </pre>
   624 </body>
   625 </html>

mercurial