xamarin-macios/tests/monotouch-test/Foundation
Manuel de la Pena ac8e52c2e2
[Foundation] Add support to ignore the cookies in the NSUrlSessionHandler. (#7677)
This change allows to ignore the use of cookies and cookie containers in
the NSUrlSessionHandler. There are two different cookie containers to
consider:

1. The native NSHttoCookieStorage.
2. The managed CookieContainer.

If the native one is set to null, the native code will not use a cookie
storage, which is used as a flag to ignore the managed one.

There is an interesting situation, we allow different types of sessions.
From the cookie storage point of view, Default and Background sessions
are the same, but Ephemeral is not, since we only want to store in ram
the cookies and do not share them.

This supposes a problem because Apple does not provide any API that will
allow to determine the session type use in the configuration. The
workaround has been to hide the direct native call for the configuration
and add an enum value that can later be accessed in the
NSUrlSessionHandler. Of course things cannot be that easy. When a
session is created with the configuration, it creates a copy, and the
internal session configuration does not longer have the flag, therefore,
we need to store the session type in the handler.

Fixes: https://github.com/xamarin/xamarin-macios/issues/7659

Co-authored-by: Chris Hamons <chris.hamons@xamarin.com>
2020-01-07 18:37:17 -05:00
..
ArrayTest.cs [foundation] Avoid unnecessary native calls for NSNull.Null. Fixes #3544 (#3984) 2018-04-26 09:24:46 -04:00
AttributedStringTest.cs [tests] Refactor API to check/assert current OS version. 2018-07-04 12:35:15 +02:00
BlockOperationTest.cs [tests] Import 2016-05-26 15:06:52 +02:00
BundleTest.cs [foundation] Add NSBundle.GetLocalizedString returning an NSString. Fixes #41292 (#3266) 2018-01-20 14:00:01 -05:00
CachedUrlResponseTest.cs [tests] Import 2016-05-26 15:06:52 +02:00
CalendarTest.cs [tests] Refactor API to check/assert current OS version. 2018-07-04 12:35:15 +02:00
CoderTest.cs [tests] Import 2016-05-26 15:06:52 +02:00
CookieTest.cs [monotouch-test] Fix versions checks. 2018-07-03 20:47:14 +02:00
DateFormatterTest.cs [tests] Import 2016-05-26 15:06:52 +02:00
DateTest.cs [foundation] Fix DateTime from NSDate seconds (decimal) precision loss when converting. Fix #32022 (#2916) 2017-10-24 10:54:17 -04:00
DecimalNumberTest.cs [tests] Import 2016-05-26 15:06:52 +02:00
DecimalTest.cs [tests] Check versions using Xcode version instead of platform version. 2016-06-27 13:07:37 +02:00
DictionaryContainerTest.cs [tests] Import 2016-05-26 15:06:52 +02:00
DimensionTest.cs Port monotouch-test suite to Xamarin.Mac (#1445) 2017-01-12 09:13:56 -09:00
EncodingDetectionOptionsTest.cs [tests] Refactor API to check/assert current OS version. 2018-07-04 12:35:15 +02:00
FileCoordinatorTest.cs [tests] Import 2016-05-26 15:06:52 +02:00
FileHandleTest.cs [tests] Import 2016-05-26 15:06:52 +02:00
FileManagerTest.cs [Foundation] Add some missing C bindings in NSFileManager. (#7664) 2020-01-02 14:05:56 -05:00
FormatterTests.cs [tests] Refactor API to check/assert current OS version. 2018-07-04 12:35:15 +02:00
IndexPathTest.cs [tests] Import 2016-05-26 15:06:52 +02:00
KeyedUnarchiverTest.cs Port monotouch-test suite to Xamarin.Mac (#1445) 2017-01-12 09:13:56 -09:00
LocaleTest.cs Port monotouch-test suite to Xamarin.Mac (#1445) 2017-01-12 09:13:56 -09:00
MutableAttributedStringTest.cs Port monotouch-test suite to Xamarin.Mac (#1445) 2017-01-12 09:13:56 -09:00
MutableDataTest.cs Port monotouch-test suite to Xamarin.Mac (#1445) 2017-01-12 09:13:56 -09:00
MutableStringTest.cs Port monotouch-test suite to Xamarin.Mac (#1445) 2017-01-12 09:13:56 -09:00
NSArray1Test.cs [tests] Import 2016-05-26 15:06:52 +02:00
NSCharacterSetTest.cs Port monotouch-test suite to Xamarin.Mac (#1445) 2017-01-12 09:13:56 -09:00
NSDataTest.cs [Tests] Centralized the endpoints for the different network tests. (#7418) 2019-11-14 05:45:33 -05:00
NSDateComponentsTest.cs [Foundation] Add not bound NSDateComponentUndefined. Fixes 60740 (#3471) 2018-02-13 20:38:24 +01:00
NSDictionary2Test.cs [NS(mutable)Dictionary] Fix bug 41343 - NSDictionary<TKey, TValue>.FromObjectsAndKeys keys and values are twisted up (#281) 2016-06-27 20:38:14 -04:00
NSDictionaryTest.cs [tests] Refactor API to check/assert current OS version. 2018-07-04 12:35:15 +02:00
NSExpressionTest.cs Fix #7174: ArgumentNullException for NSExpression.FromConstant (#7181) 2019-10-07 14:09:17 +02:00
NSInputStreamTest.cs [test] Change monotouch-test and xammac_tests to use all .cs files in monotouch-test/ Fixes #60290 (#2930) 2017-10-31 08:09:21 -08:00
NSKeyedUnarchiverTest.cs [ObjCRuntime] Add missing .ctor to 'Class' (#4726) 2018-08-29 16:23:36 -04:00
NSLayoutConstraintTest.cs [tests] Refactor API to check/assert current OS version. 2018-07-04 12:35:15 +02:00
NSLinguisticAnalysisTest.cs [tests] Refactor API to check/assert current OS version. 2018-07-04 12:35:15 +02:00
NSLocaleTest.cs [tests] Import 2016-05-26 15:06:52 +02:00
NSMutableArray1Test.cs [Foundation] Fix validate for insert for NSMutableArray<T>. Fixes #6876. (#6967) 2019-09-11 12:59:45 -04:00
NSMutableDictionary2Test.cs Merge branch 'xcode10' 2018-09-18 14:12:39 -04:00
NSMutableDictionaryTest.cs [Foundation] Bind NSMutableDictionary's addEntriesFromDictionary:. Fixes #4813. (#4819) 2018-09-17 16:14:46 +02:00
NSMutableOrderedSet1Test.cs [tests] Import 2016-05-26 15:06:52 +02:00
NSMutableOrderedSetTest.cs [tests] Import 2016-05-26 15:06:52 +02:00
NSMutableSet1Test.cs [tests] Import 2016-05-26 15:06:52 +02:00
NSMutableSetTest.cs [tests] Import 2016-05-26 15:06:52 +02:00
NSOrderedSet1Test.cs [tests] Import 2016-05-26 15:06:52 +02:00
NSOrderedSetTest.cs [tests] Import 2016-05-26 15:06:52 +02:00
NSSet1Test.cs [tests] Import 2016-05-26 15:06:52 +02:00
NSSetTest.cs [tests] Import 2016-05-26 15:06:52 +02:00
NSStreamTest.cs [monotouch-test] Disable test that uses TcpListener, since TcpListener doesn't work on watchOS. 2016-06-27 13:07:37 +02:00
NSStringTest.cs [NSString] Add overloads which are optimized for substring handling (#5517) 2019-01-31 19:09:13 +02:00
NSTimeZoneTest.cs Port monotouch-test suite to Xamarin.Mac (#1445) 2017-01-12 09:13:56 -09:00
NSUrlSessionConfiguration.cs [Foundation] Add support to ignore the cookies in the NSUrlSessionHandler. (#7677) 2020-01-07 18:37:17 -05:00
NetServiceTest.cs Port monotouch-test suite to Xamarin.Mac (#1445) 2017-01-12 09:13:56 -09:00
NotificationCenter.cs [Foundation] Make adding/removing observers in NSNotificationCenter thread safe. (#5833) 2019-04-03 11:45:11 +02:00
NotificationQueueTest.cs [tests] Import 2016-05-26 15:06:52 +02:00
NumberTest.cs [tests] Import 2016-05-26 15:06:52 +02:00
ObjectTest.cs [tests] Refactor API to check/assert current OS version. 2018-07-04 12:35:15 +02:00
OperationQueueTest.cs [tests] Import 2016-05-26 15:06:52 +02:00
OutputStreamTest.cs [tests] Import 2016-05-26 15:06:52 +02:00
ProtocolAttributeTest.cs [tests] Import 2016-05-26 15:06:52 +02:00
RegularExpressionTest.cs [Foundation] Improve/fix NSRegularExpression and NSDataDetector bindings. Fixes #5881. (#5882) 2019-04-10 15:12:24 +02:00
StringTest.cs [tests] Refactor API to check/assert current OS version. 2018-07-04 12:35:15 +02:00
ThreadTest.cs [monotouch-test] Adjust tests according to watchOS behavior. 2016-06-27 13:07:37 +02:00
TimerTest.cs [tests] Import 2016-05-26 15:06:52 +02:00
UbiquitousKeyValueStoreTest.cs [monotouch-test] Don't blindly ignore a test since it's not only run on watchOS. (#2405) 2017-08-02 16:15:35 -04:00
UrlConnectionTest.cs [Tests] Centralized the endpoints for the different network tests. (#7418) 2019-11-14 05:45:33 -05:00
UrlCredentialTest.cs [tests] Refactor API to check/assert current OS version. 2018-07-04 12:35:15 +02:00
UrlProtectionSpaceTest.cs Port monotouch-test suite to Xamarin.Mac (#1445) 2017-01-12 09:13:56 -09:00
UrlProtocolTest.cs [Tests] Centralized the endpoints for the different network tests. (#7418) 2019-11-14 05:45:33 -05:00
UrlRequestTest.cs Port monotouch-test suite to Xamarin.Mac (#1445) 2017-01-12 09:13:56 -09:00
UrlSessionConfigurationTest.cs [tests] Refactor API to check/assert current OS version. 2018-07-04 12:35:15 +02:00
UrlSessionTaskMetricsTest.cs Port monotouch-test suite to Xamarin.Mac (#1445) 2017-01-12 09:13:56 -09:00
UrlSessionTaskTest.cs [Tests] Centralized the endpoints for the different network tests. (#7418) 2019-11-14 05:45:33 -05:00
UrlSessionTaskTransactionMetricsTest.cs [monotouch-test] Adjust tests to cope with changes in Xcode 11 beta 1. 2019-06-14 20:02:27 +02:00
UrlSessionTest.cs [Tests] Centralized the endpoints for the different network tests. (#7418) 2019-11-14 05:45:33 -05:00
UrlTest.cs [tests] Refactor API to check/assert current OS version. 2018-07-04 12:35:15 +02:00
UserDefaultsTest.cs [tests] Refactor API to check/assert current OS version. 2018-07-04 12:35:15 +02:00
UuidTest.cs Port monotouch-test suite to Xamarin.Mac (#1445) 2017-01-12 09:13:56 -09:00
ZoneTest.cs Bump Xcode version to beta 2 (#349) 2016-07-07 13:10:24 -04:00