You've already forked linux-packaging-mono
Imported Upstream version 5.10.0.47
Former-commit-id: d0813289fa2d35e1f8ed77530acb4fb1df441bc0
This commit is contained in:
parent
88ff76fe28
commit
e46a49ecf1
@@ -138,7 +138,7 @@ namespace System.IO.IsolatedStorage
|
||||
|
||||
// We can save a bunch of work if the directory we want to create already exists. This also
|
||||
// saves us in the case where sub paths are inaccessible (due to ERROR_ACCESS_DENIED) but the
|
||||
// final path is accessable and the directory already exists. For example, consider trying
|
||||
// final path is accessible and the directory already exists. For example, consider trying
|
||||
// to create c:\Foo\Bar\Baz, where everything already exists but ACLS prevent access to c:\Foo
|
||||
// and c:\Foo\Bar. In that case, this code will think it needs to create c:\Foo, and c:\Foo\Bar
|
||||
// and fail to due so, causing an exception to be thrown. This is not what we want.
|
||||
|
@@ -53,9 +53,6 @@
|
||||
<Compile Include="$(CommonPath)\System\Security\IdentityHelper.cs">
|
||||
<Link>Common\System\Security\IdentityHelper.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="$(CommonTestPath)\System\PlatformDetection.cs">
|
||||
<Link>Common\System\PlatformDetection.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="AssemblyInfo.cs" />
|
||||
<Compile Include="StoreTestsFixture.cs" />
|
||||
<Compile Include="System\IO\IsolatedStorage\ContainsUnknownFilesTests.cs" />
|
||||
|
@@ -13,7 +13,7 @@ namespace System.IO.IsolatedStorage
|
||||
private static MethodInfo s_containsUnknownFilesMethod
|
||||
= typeof(IsolatedStorageFile).GetMethod("ContainsUnknownFiles", BindingFlags.NonPublic | BindingFlags.Instance);
|
||||
|
||||
[Theory MemberData(nameof(ValidStores))]
|
||||
[Theory, MemberData(nameof(ValidStores))]
|
||||
[ActiveIssue("dotnet/corefx #18265", TargetFrameworkMonikers.NetFramework)]
|
||||
public void ContainsUnknownFiles_CleanStore(PresetScopes scope)
|
||||
{
|
||||
@@ -25,7 +25,7 @@ namespace System.IO.IsolatedStorage
|
||||
}
|
||||
}
|
||||
|
||||
[Theory MemberData(nameof(ValidStores))]
|
||||
[Theory, MemberData(nameof(ValidStores))]
|
||||
[ActiveIssue("dotnet/corefx #18265", TargetFrameworkMonikers.NetFramework)]
|
||||
public void ContainsUnknownFiles_OkFiles(PresetScopes scope)
|
||||
{
|
||||
@@ -45,7 +45,7 @@ namespace System.IO.IsolatedStorage
|
||||
}
|
||||
}
|
||||
|
||||
[Theory MemberData(nameof(ValidStores))]
|
||||
[Theory, MemberData(nameof(ValidStores))]
|
||||
[ActiveIssue("dotnet/corefx #18265", TargetFrameworkMonikers.NetFramework)]
|
||||
public void ContainsUnknownFiles_NotOkFiles(PresetScopes scope)
|
||||
{
|
||||
@@ -68,7 +68,7 @@ namespace System.IO.IsolatedStorage
|
||||
}
|
||||
}
|
||||
|
||||
[Theory MemberData(nameof(ValidStores))]
|
||||
[Theory, MemberData(nameof(ValidStores))]
|
||||
[ActiveIssue("dotnet/corefx #18265", TargetFrameworkMonikers.NetFramework)]
|
||||
public void ContainsUnknownFiles_NotOkDirectory(PresetScopes scope)
|
||||
{
|
||||
|
@@ -83,7 +83,7 @@ namespace System.IO.IsolatedStorage
|
||||
}
|
||||
}
|
||||
|
||||
[Theory MemberData(nameof(ValidStores))]
|
||||
[Theory, MemberData(nameof(ValidStores))]
|
||||
[ActiveIssue("dotnet/corefx #18265", TargetFrameworkMonikers.NetFramework)]
|
||||
public void CopyFile_CopyOver(PresetScopes scope)
|
||||
{
|
||||
@@ -100,7 +100,7 @@ namespace System.IO.IsolatedStorage
|
||||
}
|
||||
}
|
||||
|
||||
[Theory MemberData(nameof(ValidStores))]
|
||||
[Theory, MemberData(nameof(ValidStores))]
|
||||
[ActiveIssue("dotnet/corefx #18265", TargetFrameworkMonikers.NetFramework)]
|
||||
public void CopyFile_CopiesFile(PresetScopes scope)
|
||||
{
|
||||
|
@@ -58,7 +58,7 @@ namespace System.IO.IsolatedStorage
|
||||
}
|
||||
}
|
||||
|
||||
[Theory MemberData(nameof(ValidStores))]
|
||||
[Theory, MemberData(nameof(ValidStores))]
|
||||
[ActiveIssue("dotnet/corefx #18268", TargetFrameworkMonikers.NetFramework)]
|
||||
public void CreateDirectory_Existance(PresetScopes scope)
|
||||
{
|
||||
|
@@ -58,7 +58,7 @@ namespace System.IO.IsolatedStorage
|
||||
}
|
||||
}
|
||||
|
||||
[Theory MemberData(nameof(ValidStores))]
|
||||
[Theory, MemberData(nameof(ValidStores))]
|
||||
[ActiveIssue("dotnet/corefx #18268", TargetFrameworkMonikers.NetFramework)]
|
||||
public void CreateFile_Existence(PresetScopes scope)
|
||||
{
|
||||
|
@@ -77,7 +77,7 @@ namespace System.IO.IsolatedStorage
|
||||
}
|
||||
}
|
||||
|
||||
[Theory MemberData(nameof(ValidStores))]
|
||||
[Theory, MemberData(nameof(ValidStores))]
|
||||
[ActiveIssue("dotnet/corefx #18265", TargetFrameworkMonikers.NetFramework)]
|
||||
public void DeleteDirectory_DeletesDirectory(PresetScopes scope)
|
||||
{
|
||||
@@ -105,7 +105,7 @@ namespace System.IO.IsolatedStorage
|
||||
}
|
||||
}
|
||||
|
||||
[Theory MemberData(nameof(ValidStores))]
|
||||
[Theory, MemberData(nameof(ValidStores))]
|
||||
[ActiveIssue("dotnet/corefx #18265", TargetFrameworkMonikers.NetFramework)]
|
||||
public void DeleteDirectory_CannotDeleteWithContent(PresetScopes scope)
|
||||
{
|
||||
|
@@ -58,7 +58,7 @@ namespace System.IO.IsolatedStorage
|
||||
}
|
||||
}
|
||||
|
||||
[Theory MemberData(nameof(ValidStores))]
|
||||
[Theory, MemberData(nameof(ValidStores))]
|
||||
[ActiveIssue("dotnet/corefx #18265", TargetFrameworkMonikers.NetFramework)]
|
||||
public void DeleteFile_DeletesFile(PresetScopes scope)
|
||||
{
|
||||
|
@@ -61,7 +61,7 @@ namespace System.IO.IsolatedStorage
|
||||
}
|
||||
}
|
||||
|
||||
[Theory MemberData(nameof(ValidStores))]
|
||||
[Theory, MemberData(nameof(ValidStores))]
|
||||
[ActiveIssue("dotnet/corefx #18265", TargetFrameworkMonikers.NetFramework)]
|
||||
public void GetFileNames_GetsFileNames(PresetScopes scope)
|
||||
{
|
||||
|
@@ -18,7 +18,7 @@ namespace System.IO.IsolatedStorage
|
||||
s_verifyScopeMethod = typeof(IsolatedStorage).GetMethod("VerifyScope", BindingFlags.NonPublic | BindingFlags.Static);
|
||||
}
|
||||
|
||||
[Theory
|
||||
[Theory,
|
||||
MemberData(nameof(ValidScopes))
|
||||
]
|
||||
public void InitStore_ValidScopes(IsolatedStorageScope scope)
|
||||
@@ -26,9 +26,9 @@ namespace System.IO.IsolatedStorage
|
||||
s_verifyScopeMethod.Invoke(null, new object[] { scope });
|
||||
}
|
||||
|
||||
[Theory
|
||||
InlineData(IsolatedStorageScope.None)
|
||||
InlineData(IsolatedStorageScope.Machine | IsolatedStorageScope.Roaming)
|
||||
[Theory,
|
||||
InlineData(IsolatedStorageScope.None),
|
||||
InlineData(IsolatedStorageScope.Machine | IsolatedStorageScope.Roaming),
|
||||
InlineData(IsolatedStorageScope.Machine | IsolatedStorageScope.User)
|
||||
]
|
||||
public void InitStore_InvalidScopes(IsolatedStorageScope scope)
|
||||
|
@@ -46,7 +46,7 @@ namespace System.IO.IsolatedStorage.Tests
|
||||
{
|
||||
// Machine scope is behind a policy that isn't enabled by default
|
||||
// https://github.com/dotnet/corefx/issues/19839
|
||||
if (scope == IsolatedStorageScope.Machine && PlatformDetection.IsWinRT)
|
||||
if (scope == IsolatedStorageScope.Machine && PlatformDetection.IsInAppContainer)
|
||||
return;
|
||||
|
||||
string path = Helper.GetDataDirectory(scope);
|
||||
|
@@ -37,8 +37,8 @@ namespace System.IO.IsolatedStorage
|
||||
Assert.Throws<InvalidOperationException>(() => storage.DomainIdentity);
|
||||
}
|
||||
|
||||
[Theory
|
||||
InlineData(IsolatedStorageScope.Application | IsolatedStorageScope.User)
|
||||
[Theory,
|
||||
InlineData(IsolatedStorageScope.Application | IsolatedStorageScope.User),
|
||||
InlineData(IsolatedStorageScope.Application | IsolatedStorageScope.User | IsolatedStorageScope.Roaming)
|
||||
// https://github.com/dotnet/corefx/issues/12628
|
||||
// InlineData(IsolatedStorageScope.Application | IsolatedStorageScope.Machine)
|
||||
@@ -51,8 +51,8 @@ namespace System.IO.IsolatedStorage
|
||||
Assert.Throws<InvalidOperationException>(() => storage.DomainIdentity);
|
||||
}
|
||||
|
||||
[Theory
|
||||
InlineData(IsolatedStorageScope.Assembly | IsolatedStorageScope.User)
|
||||
[Theory,
|
||||
InlineData(IsolatedStorageScope.Assembly | IsolatedStorageScope.User),
|
||||
InlineData(IsolatedStorageScope.Assembly | IsolatedStorageScope.User | IsolatedStorageScope.Roaming)
|
||||
// https://github.com/dotnet/corefx/issues/12628
|
||||
// InlineData(IsolatedStorageScope.Assembly | IsolatedStorageScope.Machine)
|
||||
@@ -65,8 +65,8 @@ namespace System.IO.IsolatedStorage
|
||||
Assert.Throws<InvalidOperationException>(() => storage.DomainIdentity);
|
||||
}
|
||||
|
||||
[Theory
|
||||
InlineData(IsolatedStorageScope.Assembly | IsolatedStorageScope.User | IsolatedStorageScope.Domain)
|
||||
[Theory,
|
||||
InlineData(IsolatedStorageScope.Assembly | IsolatedStorageScope.User | IsolatedStorageScope.Domain),
|
||||
InlineData(IsolatedStorageScope.Assembly | IsolatedStorageScope.User | IsolatedStorageScope.Roaming | IsolatedStorageScope.Domain)
|
||||
// https://github.com/dotnet/corefx/issues/12628
|
||||
// InlineData(IsolatedStorageScope.Assembly | IsolatedStorageScope.Machine | IsolatedStorageScope.Domain)
|
||||
|
@@ -81,7 +81,7 @@ namespace System.IO.IsolatedStorage
|
||||
|
||||
// https://github.com/dotnet/corefx/issues/12628
|
||||
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)
|
||||
&& !PlatformDetection.IsWinRT)
|
||||
&& !PlatformDetection.IsInAppContainer)
|
||||
{
|
||||
validScopes.Add(PresetScopes.MachineStoreForApplication);
|
||||
validScopes.Add(PresetScopes.MachineStoreForAssembly);
|
||||
@@ -95,7 +95,7 @@ namespace System.IO.IsolatedStorage
|
||||
/*
|
||||
* Template for Store test method
|
||||
*
|
||||
[Theory MemberData(nameof(ValidStores))]
|
||||
[Theory, MemberData(nameof(ValidStores))]
|
||||
public void ExampleTest(PresetScopes scope)
|
||||
{
|
||||
// If a dirty state will fail the test, use this
|
||||
|
@@ -79,7 +79,7 @@ namespace System.IO.IsolatedStorage
|
||||
}
|
||||
}
|
||||
|
||||
[Theory MemberData(nameof(ValidStores))]
|
||||
[Theory, MemberData(nameof(ValidStores))]
|
||||
[ActiveIssue("dotnet/corefx #18265", TargetFrameworkMonikers.NetFramework)]
|
||||
public void MoveDirectory_MoveOver(PresetScopes scope)
|
||||
{
|
||||
@@ -93,7 +93,7 @@ namespace System.IO.IsolatedStorage
|
||||
}
|
||||
}
|
||||
|
||||
[Theory MemberData(nameof(ValidStores))]
|
||||
[Theory, MemberData(nameof(ValidStores))]
|
||||
[ActiveIssue("dotnet/corefx #18265", TargetFrameworkMonikers.NetFramework)]
|
||||
public void MoveDirectory_MovesDirectory(PresetScopes scope)
|
||||
{
|
||||
|
@@ -80,7 +80,7 @@ namespace System.IO.IsolatedStorage
|
||||
}
|
||||
}
|
||||
|
||||
[Theory MemberData(nameof(ValidStores))]
|
||||
[Theory, MemberData(nameof(ValidStores))]
|
||||
[ActiveIssue("dotnet/corefx #18265", TargetFrameworkMonikers.NetFramework)]
|
||||
public void MoveFile_MoveOver(PresetScopes scope)
|
||||
{
|
||||
@@ -94,7 +94,7 @@ namespace System.IO.IsolatedStorage
|
||||
}
|
||||
}
|
||||
|
||||
[Theory MemberData(nameof(ValidStores))]
|
||||
[Theory, MemberData(nameof(ValidStores))]
|
||||
[ActiveIssue("dotnet/corefx #18265", TargetFrameworkMonikers.NetFramework)]
|
||||
public void MoveFile_MovesFile(PresetScopes scope)
|
||||
{
|
||||
|
@@ -131,7 +131,7 @@ namespace System.IO.IsolatedStorage
|
||||
}
|
||||
}
|
||||
|
||||
[Theory MemberData(nameof(ValidStores))]
|
||||
[Theory, MemberData(nameof(ValidStores))]
|
||||
[ActiveIssue("dotnet/corefx #18265", TargetFrameworkMonikers.NetFramework)]
|
||||
public void OpenFile_Existence(PresetScopes scope)
|
||||
{
|
||||
|
@@ -59,7 +59,7 @@ namespace System.IO.IsolatedStorage
|
||||
}
|
||||
}
|
||||
|
||||
[Theory MemberData(nameof(ValidStores))]
|
||||
[Theory, MemberData(nameof(ValidStores))]
|
||||
[ActiveIssue("dotnet/corefx #18265", TargetFrameworkMonikers.NetFramework)]
|
||||
public void RemoveStoreWithContent(PresetScopes scope)
|
||||
{
|
||||
|
@@ -35,7 +35,7 @@ namespace System.IO.IsolatedStorage
|
||||
// https://github.com/dotnet/corefx/issues/12628
|
||||
// https://github.com/dotnet/corefx/issues/19839
|
||||
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)
|
||||
&& !PlatformDetection.IsWinRT)
|
||||
&& !PlatformDetection.IsInAppContainer)
|
||||
{
|
||||
s_roots.Add(Helper.GetDataDirectory(IsolatedStorageScope.Machine));
|
||||
}
|
||||
|
Reference in New Issue
Block a user