feat(ads/seo/release): v1.2.0 with live Google Ads, isolated ad profile, ads.txt, and SEO/AEO/GEO optimization
This commit is contained in:
parent
a88aafa1e5
commit
0e568f1f0a
975 changed files with 130593 additions and 16783 deletions
|
|
@ -0,0 +1,44 @@
|
|||
using System;
|
||||
using Paca.Browser.Security;
|
||||
using Xunit;
|
||||
|
||||
namespace Paca.Tests.Browser;
|
||||
|
||||
public class ChromeSecurityBadgeEvaluatorTests
|
||||
{
|
||||
[Theory]
|
||||
[InlineData("https://google.com", SecurityLevel.Secure)]
|
||||
[InlineData("https://github.com/settings", SecurityLevel.Secure)]
|
||||
[InlineData("http://insecure-site.com", SecurityLevel.Insecure)]
|
||||
[InlineData("http://example.org/page", SecurityLevel.Insecure)]
|
||||
[InlineData("chrome://settings", SecurityLevel.InternalScheme)]
|
||||
[InlineData("paca://downloads", SecurityLevel.InternalScheme)]
|
||||
[InlineData("", SecurityLevel.Blank)]
|
||||
[InlineData(null, SecurityLevel.Blank)]
|
||||
public void Evaluates_Basic_Urls_Correctly(string? url, SecurityLevel expectedLevel)
|
||||
{
|
||||
var result = SecurityBadgeEvaluator.Evaluate(url);
|
||||
Assert.Equal(expectedLevel, result.Level);
|
||||
Assert.False(string.IsNullOrWhiteSpace(result.Tooltip));
|
||||
Assert.False(string.IsNullOrWhiteSpace(result.IconGlyph));
|
||||
Assert.False(string.IsNullOrWhiteSpace(result.ColorHex));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void SslError_Forces_Dangerous_Level()
|
||||
{
|
||||
var result = SecurityBadgeEvaluator.Evaluate("https://self-signed.badssl.com", hasSslError: true);
|
||||
Assert.Equal(SecurityLevel.Dangerous, result.Level);
|
||||
Assert.Contains("위험", result.Tooltip);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Localhost_Is_Considered_Secure_Development_Origin()
|
||||
{
|
||||
var localhost = SecurityBadgeEvaluator.Evaluate("http://localhost:52100");
|
||||
Assert.Equal(SecurityLevel.Secure, localhost.Level);
|
||||
|
||||
var ip127 = SecurityBadgeEvaluator.Evaluate("http://127.0.0.1:8080");
|
||||
Assert.Equal(SecurityLevel.Secure, ip127.Level);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue