netwerk/test/unit/test_cache2-14-concurent-readers.js

Wed, 31 Dec 2014 06:55:46 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:55:46 +0100
changeset 1
ca08bd8f51b2
permissions
-rw-r--r--

Added tag TORBROWSER_REPLICA for changeset 6474c204b198

     1 function run_test()
     2 {
     3   do_get_profile();
     5   asyncOpenCacheEntry("http://x/", "disk", Ci.nsICacheStorage.OPEN_NORMALLY, null,
     6     new OpenCallback(NEW, "x1m", "x1d", function(entry) {
     7       // nothing to do here, we expect concurent callbacks to get
     8       // all notified, then the test finishes
     9     })
    10   );
    12   var mc = new MultipleCallbacks(3, finish_cache2_test);
    14   asyncOpenCacheEntry("http://x/", "disk", Ci.nsICacheStorage.OPEN_NORMALLY, null,
    15     new OpenCallback(NORMAL, "x1m", "x1d", function(entry) {
    16       mc.fired();
    17     })
    18   );
    19   asyncOpenCacheEntry("http://x/", "disk", Ci.nsICacheStorage.OPEN_NORMALLY, null,
    20     new OpenCallback(NORMAL, "x1m", "x1d", function(entry) {
    21       mc.fired();
    22     })
    23   );
    24   asyncOpenCacheEntry("http://x/", "disk", Ci.nsICacheStorage.OPEN_NORMALLY, null,
    25     new OpenCallback(NORMAL, "x1m", "x1d", function(entry) {
    26       mc.fired();
    27     })
    28   );
    30   do_test_pending();
    31 }

mercurial