mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1162422 - Fix test cases, r=dhylands
This commit is contained in:
parent
a0c610bbd8
commit
0c7f9c974f
@ -52,8 +52,6 @@ add_test(function setup_sdcard() {
|
||||
let vol = volumeService.getVolumeByName(volName);
|
||||
ok(vol, "volume shouldn't be null");
|
||||
equal(volName, vol.name, "name");
|
||||
|
||||
volumeService.SetFakeVolumeState(volName, Ci.nsIVolume.STATE_MOUNTED);
|
||||
equal(Ci.nsIVolume.STATE_MOUNTED, vol.state, "state");
|
||||
|
||||
run_next_test();
|
||||
|
@ -439,7 +439,7 @@ NS_IMETHODIMP
|
||||
nsVolumeService::CreateFakeVolume(const nsAString& name, const nsAString& path)
|
||||
{
|
||||
if (XRE_GetProcessType() == GeckoProcessType_Default) {
|
||||
nsRefPtr<nsVolume> vol = new nsVolume(name, path, nsIVolume::STATE_MOUNTED,
|
||||
nsRefPtr<nsVolume> vol = new nsVolume(name, path, nsIVolume::STATE_INIT,
|
||||
-1 /* mountGeneration */,
|
||||
true /* isMediaPresent */,
|
||||
false /* isSharing */,
|
||||
@ -448,6 +448,7 @@ nsVolumeService::CreateFakeVolume(const nsAString& name, const nsAString& path)
|
||||
false /* isUnmounting */,
|
||||
false /* isRemovable */,
|
||||
false /* isHotSwappable */);
|
||||
vol->SetState(nsIVolume::STATE_MOUNTED);
|
||||
vol->LogState();
|
||||
UpdateVolume(vol.get());
|
||||
return NS_OK;
|
||||
|
@ -18,12 +18,8 @@ ok(vol, "volume shouldn't be null");
|
||||
|
||||
is(volName, vol.name, "name");
|
||||
is(mountPoint, vol.mountPoint, "moutnPoint");
|
||||
is(Ci.nsIVolume.STATE_INIT, vol.state, "state");
|
||||
|
||||
|
||||
let oldMountGen = vol.mountGeneration;
|
||||
volumeService.SetFakeVolumeState(volName, Ci.nsIVolume.STATE_MOUNTED);
|
||||
is(Ci.nsIVolume.STATE_MOUNTED, vol.state, "state");
|
||||
ok(vol.mountGeneration > oldMountGen, "mount generation should be incremented");
|
||||
|
||||
ok(vol.mountGeneration > 0, "mount generation should not be zero");
|
||||
|
||||
finish();
|
||||
|
Loading…
Reference in New Issue
Block a user