Skip to content

Commit fe4c0b6

Browse files
committed
Test - Add expiry to DevToolsClientFacts.CanSetCookieForDomain test
#3218
1 parent cd1a239 commit fe4c0b6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

CefSharp.Test/DevTools/DevToolsClientFacts.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
//
33
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
44

5+
using System;
56
using System.Threading.Tasks;
67
using CefSharp.DevTools.Browser;
78
using CefSharp.DevTools.Network;
@@ -116,7 +117,8 @@ public async Task CanSetCookieForDomain(string name, string value, string domain
116117

117118
using (var devToolsClient = browser.GetDevToolsClient())
118119
{
119-
var response = await devToolsClient.Network.SetCookieAsync(name, value, domain: domain, sameSite: sameSite);
120+
var expiry = DateTimeOffset.UtcNow.AddDays(10);
121+
var response = await devToolsClient.Network.SetCookieAsync(name, value, domain: domain, sameSite: sameSite, expires: expiry.ToUnixTimeSeconds());
120122
Assert.True(response.Success, "SetCookieForDomain");
121123
}
122124
}

0 commit comments

Comments
 (0)