1 /* 2 * Copyright 2014 Haiku, inc. 3 * Distributed under the terms of the MIT License. 4 */ 5 #ifndef COOKIE_TEST_H 6 #define COOKIE_TEST_H 7 8 9 #include <TestCase.h> 10 #include <TestSuite.h> 11 12 namespace BPrivate { 13 namespace Network { 14 class BNetworkCookie; 15 class BNetworkCookieJar; 16 } 17 } 18 using BPrivate::Network::BNetworkCookie; 19 using BPrivate::Network::BNetworkCookieJar; 20 class BUrl; 21 22 23 class CookieTest: public BTestCase { 24 public: 25 CookieTest(); 26 virtual ~CookieTest(); 27 28 void SimpleTest(); 29 void StandardTest(); 30 void ExpireTest(); 31 void PathTest(); 32 void MaxSizeTest(); 33 void MaxNumberTest(); 34 void UpdateTest(); 35 void HttpOnlyTest(); 36 void EncodingTest(); 37 void DomainTest(); 38 void PersistantTest(); 39 void OverwriteTest(); 40 void OrderTest(); 41 42 void ExpireParsingTest(); 43 void PathMatchingTest(); 44 void DomainMatchingTest(); 45 void MaxAgeParsingTest(); 46 47 void ExplodeTest(); 48 49 static void AddTests(BTestSuite& suite); 50 51 private: 52 const BNetworkCookie* _GetCookie(BNetworkCookieJar& jar, const BUrl& url, 53 const char* name); 54 }; 55 56 57 #endif 58