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