Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
1 /* Any copyright is dedicated to the Public Domain.
2 * http://creativecommons.org/publicdomain/zero/1.0/ */
4 MARIONETTE_TIMEOUT = 10000;
6 let Cc = SpecialPowers.Cc;
7 let Ci = SpecialPowers.Ci;
9 let volumeService = Cc["@mozilla.org/telephony/volume-service;1"].getService(Ci.nsIVolumeService);
10 ok(volumeService, "Should have volume service");
12 let volName = "fake";
13 let mountPoint = "/data/fake/storage";
14 volumeService.createFakeVolume(volName, mountPoint);
16 let vol = volumeService.getVolumeByName(volName);
17 ok(vol, "volume shouldn't be null");
19 is(volName, vol.name, "name");
20 is(mountPoint, vol.mountPoint, "moutnPoint");
21 is(Ci.nsIVolume.STATE_INIT, vol.state, "state");
24 let oldMountGen = vol.mountGeneration;
25 volumeService.SetFakeVolumeState(volName, Ci.nsIVolume.STATE_MOUNTED);
26 is(Ci.nsIVolume.STATE_MOUNTED, vol.state, "state");
27 ok(vol.mountGeneration > oldMountGen, "mount generation should be incremented");
29 finish();