T3-11/14/15 + M2 잔여: 권한 정책 UI(PermissionGate/PermissionRequested 다이얼로그+SavesInProfile), 추적 방지(TrackerBlocklist/WebResourceRequested 차단+실드 배지·팝업), 주소창 진행 바+파라미터 제거 복사(UrlCleaner/NavProgressTracker), U5 완료 알림(Mobile.Core 감지기+Plugin.LocalNotification), 재생중 ongoing 미디어 알림, 썸네일/해상도 API(Thumbnailer 사이드카 캐시+/thumb)+라이브러리 그리드, 외부망 안내(ConnectionTroubleshoot). 147 tests GREEN
This commit is contained in:
parent
27c91c04dd
commit
46c6c321f2
26 changed files with 1058 additions and 30 deletions
46
VideoDownloader.Tests/Browser/PermissionGateTests.cs
Normal file
46
VideoDownloader.Tests/Browser/PermissionGateTests.cs
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
using VideoDownloader.Browser;
|
||||
|
||||
namespace VideoDownloader.Tests.Browser;
|
||||
|
||||
/// <summary>T3-11: 사이트별 권한 정책 — 기억된 상태 우선, 미기억은 Ask(프롬프트).</summary>
|
||||
public class PermissionGateTests
|
||||
{
|
||||
[Fact]
|
||||
public void 미기억_권한은_Ask()
|
||||
=> Assert.Equal(PermissionVerdict.Ask, new PermissionGate().Decide("notifications", "https://x.com"));
|
||||
|
||||
[Theory]
|
||||
[InlineData("allow")]
|
||||
[InlineData("deny")]
|
||||
public void 기억된_판정은_그대로_반환(string v)
|
||||
{
|
||||
var g = new PermissionGate();
|
||||
g.Remember("notifications", "https://x.com", v == "allow" ? PermissionVerdict.Allow : PermissionVerdict.Deny);
|
||||
Assert.Equal(v == "allow" ? PermissionVerdict.Allow : PermissionVerdict.Deny,
|
||||
g.Decide("notifications", "https://x.com"));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void 판정은_출처_단위_격리()
|
||||
{
|
||||
var g = new PermissionGate();
|
||||
g.Remember("geolocation", "https://a.com", PermissionVerdict.Allow);
|
||||
Assert.Equal(PermissionVerdict.Ask, g.Decide("geolocation", "https://b.com"));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void 판정은_종류_단위_격리()
|
||||
{
|
||||
var g = new PermissionGate();
|
||||
g.Remember("notifications", "https://a.com", PermissionVerdict.Allow);
|
||||
Assert.Equal(PermissionVerdict.Ask, g.Decide("camera", "https://a.com"));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void OtherSensors_등_민감_종류는_자동_거절()
|
||||
=> Assert.Equal(PermissionVerdict.Deny, new PermissionGate().Decide("OtherSensors", "https://x.com"));
|
||||
|
||||
[Fact]
|
||||
public void MultipleAutomaticDownloads_파일_다운로드는_자동_허용()
|
||||
=> Assert.Equal(PermissionVerdict.Allow, new PermissionGate().Decide("MultipleAutomaticDownloads", "https://x.com"));
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue