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 13 class BNetworkCookie; 14 class BNetworkCookieJar; 15 class BUrl; 16 17 18 class CookieTest: public BTestCase { 19 public: 20 CookieTest(); 21 virtual ~CookieTest(); 22 23 void SimpleTest(); 24 void StandardTest(); 25 void ExpireTest(); 26 void PathTest(); 27 void MaxSizeTest(); 28 void MaxNumberTest(); 29 void UpdateTest(); 30 void HttpOnlyTest(); 31 void EncodingTest(); 32 void DomainTest(); 33 void PersistantTest(); 34 void OverwriteTest(); 35 void OrderTest(); 36 37 void ExpireParsingTest(); 38 void PathMatchingTest(); 39 void DomainMatchingTest(); 40 void MaxAgeParsingTest(); 41 42 void ExplodeTest(); 43 44 static void AddTests(BTestSuite& suite); 45 46 private: 47 const BNetworkCookie* _GetCookie(BNetworkCookieJar& jar, const BUrl& url, 48 const char* name); 49 }; 50 51 52 #endif 53