Skip to content

Commit 856755d

Browse files
committed
Rename IgnoreHTTPSErrors to AcceptInsecureCerts
1 parent 14f64c0 commit 856755d

File tree

20 files changed

+56
-56
lines changed

20 files changed

+56
-56
lines changed

lib/PuppeteerSharp.Nunit/TestExpectations/TestExpectations.local.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@
453453
},
454454
{
455455
"comment": "This is part of organizing the webdriver bidi implementation, We will remove it one by one",
456-
"testIdPattern": "[ignorehttpserrors.spec] *",
456+
"testIdPattern": "[acceptInsecureCerts.spec] *",
457457
"platforms": [
458458
"darwin",
459459
"linux",

lib/PuppeteerSharp.Nunit/TestExpectations/TestExpectations.upstream.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1727,77 +1727,77 @@
17271727
"comment": "TODO: add a comment explaining why this expectation is required (include links to issues)"
17281728
},
17291729
{
1730-
"testIdPattern": "[ignorehttpserrors.spec] ignoreHTTPSErrors Response.securityDetails Network redirects should report SecurityDetails",
1730+
"testIdPattern": "[acceptInsecureCerts.spec] ignoreHTTPSErrors Response.securityDetails Network redirects should report SecurityDetails",
17311731
"platforms": ["darwin", "linux", "win32"],
17321732
"parameters": ["chrome", "webDriverBiDi"],
17331733
"expectations": ["FAIL"],
17341734
"comment": "TODO: add a comment explaining why this expectation is required (include links to issues)"
17351735
},
17361736
{
1737-
"testIdPattern": "[ignorehttpserrors.spec] ignoreHTTPSErrors Response.securityDetails Network redirects should report SecurityDetails",
1737+
"testIdPattern": "[acceptInsecureCerts.spec] ignoreHTTPSErrors Response.securityDetails Network redirects should report SecurityDetails",
17381738
"platforms": ["darwin", "linux", "win32"],
17391739
"parameters": ["cdp", "firefox"],
17401740
"expectations": ["FAIL", "PASS"],
17411741
"comment": "TODO: add a comment explaining why this expectation is required (include links to issues)"
17421742
},
17431743
{
1744-
"testIdPattern": "[ignorehttpserrors.spec] ignoreHTTPSErrors Response.securityDetails Network redirects should report SecurityDetails",
1744+
"testIdPattern": "[acceptInsecureCerts.spec] ignoreHTTPSErrors Response.securityDetails Network redirects should report SecurityDetails",
17451745
"platforms": ["darwin", "linux", "win32"],
17461746
"parameters": ["firefox", "webDriverBiDi"],
17471747
"expectations": ["FAIL"],
17481748
"comment": "TODO: add a comment explaining why this expectation is required (include links to issues)"
17491749
},
17501750
{
1751-
"testIdPattern": "[ignorehttpserrors.spec] ignoreHTTPSErrors Response.securityDetails should be |null| for non-secure requests",
1751+
"testIdPattern": "[acceptInsecureCerts.spec] ignoreHTTPSErrors Response.securityDetails should be |null| for non-secure requests",
17521752
"platforms": ["darwin", "linux", "win32"],
17531753
"parameters": ["chrome", "webDriverBiDi"],
17541754
"expectations": ["FAIL"],
17551755
"comment": "TODO: add a comment explaining why this expectation is required (include links to issues)"
17561756
},
17571757
{
1758-
"testIdPattern": "[ignorehttpserrors.spec] ignoreHTTPSErrors Response.securityDetails should be |null| for non-secure requests",
1758+
"testIdPattern": "[acceptInsecureCerts.spec] ignoreHTTPSErrors Response.securityDetails should be |null| for non-secure requests",
17591759
"platforms": ["darwin", "linux", "win32"],
17601760
"parameters": ["firefox", "webDriverBiDi"],
17611761
"expectations": ["FAIL"],
17621762
"comment": "TODO: add a comment explaining why this expectation is required (include links to issues)"
17631763
},
17641764
{
1765-
"testIdPattern": "[ignorehttpserrors.spec] ignoreHTTPSErrors Response.securityDetails should work",
1765+
"testIdPattern": "[acceptInsecureCerts.spec] ignoreHTTPSErrors Response.securityDetails should work",
17661766
"platforms": ["darwin", "linux", "win32"],
17671767
"parameters": ["chrome", "webDriverBiDi"],
17681768
"expectations": ["FAIL"],
17691769
"comment": "TODO: add a comment explaining why this expectation is required (include links to issues)"
17701770
},
17711771
{
1772-
"testIdPattern": "[ignorehttpserrors.spec] ignoreHTTPSErrors Response.securityDetails should work",
1772+
"testIdPattern": "[acceptInsecureCerts.spec] ignoreHTTPSErrors Response.securityDetails should work",
17731773
"platforms": ["darwin", "linux", "win32"],
17741774
"parameters": ["cdp", "firefox"],
17751775
"expectations": ["FAIL"],
17761776
"comment": "TODO: add a comment explaining why this expectation is required (include links to issues)"
17771777
},
17781778
{
1779-
"testIdPattern": "[ignorehttpserrors.spec] ignoreHTTPSErrors Response.securityDetails should work",
1779+
"testIdPattern": "[acceptInsecureCerts.spec] ignoreHTTPSErrors Response.securityDetails should work",
17801780
"platforms": ["darwin", "linux", "win32"],
17811781
"parameters": ["firefox", "webDriverBiDi"],
17821782
"expectations": ["FAIL"],
17831783
"comment": "TODO: add a comment explaining why this expectation is required (include links to issues)"
17841784
},
17851785
{
1786-
"testIdPattern": "[ignorehttpserrors.spec] ignoreHTTPSErrors should work with request interception",
1786+
"testIdPattern": "[acceptInsecureCerts.spec] ignoreHTTPSErrors should work with request interception",
17871787
"platforms": ["darwin", "linux", "win32"],
17881788
"parameters": ["chrome", "webDriverBiDi"],
17891789
"expectations": ["FAIL"],
17901790
"comment": "TODO: add a comment explaining why this expectation is required (include links to issues)"
17911791
},
17921792
{
1793-
"testIdPattern": "[ignorehttpserrors.spec] ignoreHTTPSErrors should work with request interception",
1793+
"testIdPattern": "[acceptInsecureCerts.spec] ignoreHTTPSErrors should work with request interception",
17941794
"platforms": ["darwin", "linux", "win32"],
17951795
"parameters": ["cdp", "firefox"],
17961796
"expectations": ["FAIL"],
17971797
"comment": "TODO: add a comment explaining why this expectation is required (include links to issues)"
17981798
},
17991799
{
1800-
"testIdPattern": "[ignorehttpserrors.spec] ignoreHTTPSErrors should work with request interception",
1800+
"testIdPattern": "[acceptInsecureCerts.spec] ignoreHTTPSErrors should work with request interception",
18011801
"platforms": ["darwin", "linux", "win32"],
18021802
"parameters": ["firefox", "webDriverBiDi"],
18031803
"expectations": ["FAIL"],

lib/PuppeteerSharp.Tests/BFCacheTests/BFCacheTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public class BFCacheTests : PuppeteerPageBaseTest
1010
public BFCacheTests()
1111
{
1212
DefaultOptions = TestConstants.DefaultBrowserOptions();
13-
DefaultOptions.IgnoreHTTPSErrors = true;
13+
DefaultOptions.AcceptInsecureCerts = true;
1414
}
1515

1616
[Test, Retry(2), PuppeteerTest("bfcache.spec", "BFCache", "can navigate to a BFCached page")]

lib/PuppeteerSharp.Tests/CookiesTests/SetCookiesTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ await Page.EvaluateFunctionAsync(@"src => {
347347
public async Task ShouldSetSecureSameSiteCookiesFromAFrame()
348348
{
349349
var options = TestConstants.DefaultBrowserOptions();
350-
options.IgnoreHTTPSErrors = true;
350+
options.AcceptInsecureCerts = true;
351351

352352
await using var browser = await Puppeteer.LaunchAsync(options, TestConstants.LoggerFactory);
353353
await using var page = await browser.NewPageAsync();

lib/PuppeteerSharp.Tests/IgnoreHttpsErrorsTests/IgnoreHttpsErrorsTests.cs renamed to lib/PuppeteerSharp.Tests/IgnoreHttpsErrorsTests/AcceptInsecureCertsTests.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,22 @@
66

77
namespace PuppeteerSharp.Tests.IgnoreHttpsErrorsTests
88
{
9-
public class IgnoreHttpsErrorsTests : PuppeteerPageBaseTest
9+
public class AcceptInsecureCertsTests : PuppeteerPageBaseTest
1010
{
11-
public IgnoreHttpsErrorsTests() : base()
11+
public AcceptInsecureCertsTests() : base()
1212
{
1313
DefaultOptions = TestConstants.DefaultBrowserOptions();
14-
DefaultOptions.IgnoreHTTPSErrors = true;
14+
DefaultOptions.AcceptInsecureCerts = true;
1515
}
1616

17-
[Test, Retry(2), PuppeteerTest("ignorehttpserrors.spec", "ignoreHTTPSErrors", "should work")]
17+
[Test, Retry(2), PuppeteerTest("acceptInsecureCerts.spec", "ignoreHTTPSErrors", "should work")]
1818
public async Task ShouldWork()
1919
{
2020
var response = await Page.GoToAsync($"{TestConstants.HttpsPrefix}/empty.html");
2121
Assert.That(response.Ok, Is.True);
2222
}
2323

24-
[Test, Retry(2), PuppeteerTest("ignorehttpserrors.spec", "ignoreHTTPSErrors", "should work with request interception")]
24+
[Test, Retry(2), PuppeteerTest("acceptInsecureCerts.spec", "ignoreHTTPSErrors", "should work with request interception")]
2525
public async Task ShouldWorkWithRequestInterception()
2626
{
2727
await Page.SetRequestInterceptionAsync(true);
@@ -30,7 +30,7 @@ public async Task ShouldWorkWithRequestInterception()
3030
Assert.That(response.Status, Is.EqualTo(HttpStatusCode.OK));
3131
}
3232

33-
[Test, Retry(2), PuppeteerTest("ignorehttpserrors.spec", "ignoreHTTPSErrors", "should work with mixed content")]
33+
[Test, Retry(2), PuppeteerTest("acceptInsecureCerts.spec", "ignoreHTTPSErrors", "should work with mixed content")]
3434
public async Task ShouldWorkWithMixedContent()
3535
{
3636
HttpsServer.SetRoute("/mixedcontent.html", async (context) =>

lib/PuppeteerSharp.Tests/IgnoreHttpsErrorsTests/ResponseSecurityDetailsTests.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ public class ResponseSecurityDetailsTests : PuppeteerPageBaseTest
1313
public ResponseSecurityDetailsTests() : base()
1414
{
1515
DefaultOptions = TestConstants.DefaultBrowserOptions();
16-
DefaultOptions.IgnoreHTTPSErrors = true;
16+
DefaultOptions.AcceptInsecureCerts = true;
1717
}
1818

19-
[Test, Retry(2), PuppeteerTest("ignorehttpserrors.spec", "Response.securityDetails", "Should Work")]
19+
[Test, Retry(2), PuppeteerTest("acceptInsecureCerts.spec", "Response.securityDetails", "Should Work")]
2020
public async Task ShouldWork()
2121
{
2222
// Checking for the TLS socket is it is in upstreams proves to be flaky in .net framework.
@@ -28,14 +28,14 @@ public async Task ShouldWork()
2828
Assert.That(response.SecurityDetails.Protocol, Does.Contain("TLS"));
2929
}
3030

31-
[Test, Retry(2), PuppeteerTest("ignorehttpserrors.spec", "Response.securityDetails", "should be |null| for non-secure requests")]
31+
[Test, Retry(2), PuppeteerTest("acceptInsecureCerts.spec", "Response.securityDetails", "should be |null| for non-secure requests")]
3232
public async Task ShouldBeNullForNonSecureRequests()
3333
{
3434
var response = await Page.GoToAsync(TestConstants.EmptyPage);
3535
Assert.That(response.SecurityDetails, Is.Null);
3636
}
3737

38-
[Test, Retry(2), PuppeteerTest("ignorehttpserrors.spec", "Response.securityDetails", "Network redirects should report SecurityDetails")]
38+
[Test, Retry(2), PuppeteerTest("acceptInsecureCerts.spec", "Response.securityDetails", "Network redirects should report SecurityDetails")]
3939
[Ignore("This is super flaky")]
4040
public async Task NetworkRedirectsShouldReportSecurityDetails()
4141
{

lib/PuppeteerSharp.Tests/LauncherTests/PuppeteerConnectTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public async Task ShouldSupportIgnoreHTTPSErrorsOption()
5454
await using var browser = await Puppeteer.ConnectAsync(new ConnectOptions
5555
{
5656
BrowserWSEndpoint = originalBrowser.WebSocketEndpoint,
57-
IgnoreHTTPSErrors = true
57+
AcceptInsecureCerts = true
5858
});
5959
await using var page = await browser.NewPageAsync();
6060
var requestTask = HttpsServer.WaitForRequest(

lib/PuppeteerSharp.Tests/LauncherTests/PuppeteerLaunchTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public class PuppeteerLaunchTests : PuppeteerBaseTest
1818
public async Task ShouldWorkInRealLife()
1919
{
2020
var options = TestConstants.DefaultBrowserOptions();
21-
options.IgnoreHTTPSErrors = true;
21+
options.AcceptInsecureCerts = true;
2222

2323
await using var browser = await Puppeteer.LaunchAsync(options, TestConstants.LoggerFactory);
2424
await using var page = await browser.NewPageAsync();

lib/PuppeteerSharp/Browser.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public abstract class Browser : IBrowser
3939
public Process Process => Launcher?.Process;
4040

4141
/// <inheritdoc/>
42-
public bool IgnoreHTTPSErrors { get; set; }
42+
public bool AcceptInsecureCerts { get; set; }
4343

4444
/// <inheritdoc/>
4545
public abstract bool IsClosed { get; }

lib/PuppeteerSharp/Cdp/CdpBrowser.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,14 @@ internal CdpBrowser(
4646
SupportedBrowser browser,
4747
Connection connection,
4848
string[] contextIds,
49-
bool ignoreHTTPSErrors,
49+
bool acceptInsecureCerts,
5050
ViewPortOptions defaultViewport,
5151
LauncherBase launcher,
5252
Func<Target, bool> targetFilter = null,
5353
Func<Target, bool> isPageTargetFunc = null)
5454
{
5555
BrowserType = browser;
56-
IgnoreHTTPSErrors = ignoreHTTPSErrors;
56+
AcceptInsecureCerts = acceptInsecureCerts;
5757
DefaultViewport = defaultViewport;
5858
Launcher = launcher;
5959
Connection = connection;
@@ -157,7 +157,7 @@ internal static async Task<CdpBrowser> CreateAsync(
157157
SupportedBrowser browserToCreate,
158158
Connection connection,
159159
string[] contextIds,
160-
bool ignoreHTTPSErrors,
160+
bool acceptInsecureCerts,
161161
ViewPortOptions defaultViewPort,
162162
LauncherBase launcher,
163163
Func<Target, bool> targetFilter = null,
@@ -168,7 +168,7 @@ internal static async Task<CdpBrowser> CreateAsync(
168168
browserToCreate,
169169
connection,
170170
contextIds,
171-
ignoreHTTPSErrors,
171+
acceptInsecureCerts,
172172
defaultViewPort,
173173
launcher,
174174
targetFilter,
@@ -267,7 +267,7 @@ private CdpTarget CreateTarget(TargetInfo targetInfo, CDPSession session, CDPSes
267267
context,
268268
TargetManager,
269269
CreateSession,
270-
IgnoreHTTPSErrors,
270+
AcceptInsecureCerts,
271271
DefaultViewport,
272272
ScreenshotTaskQueue);
273273
}
@@ -280,7 +280,7 @@ private CdpTarget CreateTarget(TargetInfo targetInfo, CDPSession session, CDPSes
280280
context,
281281
TargetManager,
282282
CreateSession,
283-
IgnoreHTTPSErrors,
283+
AcceptInsecureCerts,
284284
DefaultViewport,
285285
ScreenshotTaskQueue);
286286
}

0 commit comments

Comments
 (0)