Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,19 @@ void setGetDelete() {
expect(await cookieManager.removeSessionCookies(), isTrue);
}

await cookieManager.setCookie(url: url, name: "myCookie", value: "myValue");
// Empty cookie-value is allowed according to https://datatracker.ietf.org/doc/html/rfc6265#section-4.1.1
await cookieManager.setCookie(url: url, name: "myCookie", value: "");
List<Cookie> cookies = await cookieManager.getCookies(url: url);
expect(cookies, isNotEmpty);

Cookie? cookie = await cookieManager.getCookie(url: url, name: "myCookie");
expect(cookie?.value.toString(), "");

await cookieManager.setCookie(url: url, name: "myCookie", value: "myValue");
cookies = await cookieManager.getCookies(url: url);
expect(cookies, isNotEmpty);

cookie = await cookieManager.getCookie(url: url, name: "myCookie");
expect(cookie?.value.toString(), "myValue");

expect(
Expand Down
1 change: 0 additions & 1 deletion flutter_inappwebview_android/lib/src/cookie_manager.dart
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ class AndroidCookieManager extends PlatformCookieManager
PlatformInAppWebViewController? webViewController}) async {
assert(url.toString().isNotEmpty);
assert(name.isNotEmpty);
assert(value.isNotEmpty);
assert(path.isNotEmpty);

Map<String, dynamic> args = <String, dynamic>{};
Expand Down
1 change: 0 additions & 1 deletion flutter_inappwebview_ios/lib/src/cookie_manager.dart
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ class IOSCookieManager extends PlatformCookieManager with ChannelController {

assert(url.toString().isNotEmpty);
assert(name.isNotEmpty);
assert(value.isNotEmpty);
assert(path.isNotEmpty);

if (await _shouldUseJavascript()) {
Expand Down
1 change: 0 additions & 1 deletion flutter_inappwebview_macos/lib/src/cookie_manager.dart
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ class MacOSCookieManager extends PlatformCookieManager with ChannelController {

assert(url.toString().isNotEmpty);
assert(name.isNotEmpty);
assert(value.isNotEmpty);
assert(path.isNotEmpty);

if (await _shouldUseJavascript()) {
Expand Down
1 change: 0 additions & 1 deletion flutter_inappwebview_web/lib/src/cookie_manager.dart
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ class WebPlatformCookieManager extends PlatformCookieManager

assert(url.toString().isNotEmpty);
assert(name.isNotEmpty);
assert(value.isNotEmpty);
assert(path.isNotEmpty);

await _setCookieWithJavaScript(
Expand Down
1 change: 0 additions & 1 deletion flutter_inappwebview_windows/lib/src/cookie_manager.dart
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ class WindowsCookieManager extends PlatformCookieManager
PlatformInAppWebViewController? webViewController}) async {
assert(url.toString().isNotEmpty);
assert(name.isNotEmpty);
assert(value.isNotEmpty);
assert(path.isNotEmpty);

Map<String, dynamic> args = <String, dynamic>{};
Expand Down