mirror of
				https://bitbucket.org/chromiumembedded/cef
				synced 2025-06-05 21:39:12 +02:00 
			
		
		
		
	Mac: Add support for cef_time_t.day_of_week (issue #629).
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@691 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
		| @@ -44,9 +44,7 @@ extern "C" { | ||||
| typedef struct _cef_time_t { | ||||
|   int year;          // Four digit year "2007" | ||||
|   int month;         // 1-based month (values 1 = January, etc.) | ||||
| #if !defined(OS_MACOSX) | ||||
|   int day_of_week;   // 0-based day of week (0 = Sunday, etc.) | ||||
| #endif | ||||
|   int day_of_month;  // 1-based day of month (1-31) | ||||
|   int hour;          // Hour within the current day (0-23) | ||||
|   int minute;        // Minute within the current hour (0-59) | ||||
|   | ||||
| @@ -8,9 +8,7 @@ void cef_time_to_basetime(const cef_time_t& cef_time, base::Time& time) { | ||||
|   base::Time::Exploded exploded; | ||||
|   exploded.year = cef_time.year; | ||||
|   exploded.month = cef_time.month; | ||||
| #if !defined(OS_MACOSX) | ||||
|   exploded.day_of_week = cef_time.day_of_week; | ||||
| #endif | ||||
|   exploded.day_of_month = cef_time.day_of_month; | ||||
|   exploded.hour = cef_time.hour; | ||||
|   exploded.minute = cef_time.minute; | ||||
| @@ -24,9 +22,7 @@ void cef_time_from_basetime(const base::Time& time, cef_time_t& cef_time) { | ||||
|   time.UTCExplode(&exploded); | ||||
|   cef_time.year = exploded.year; | ||||
|   cef_time.month = exploded.month; | ||||
| #if !defined(OS_MACOSX) | ||||
|   cef_time.day_of_week = exploded.day_of_week; | ||||
| #endif | ||||
|   cef_time.day_of_month = exploded.day_of_month; | ||||
|   cef_time.hour = exploded.hour; | ||||
|   cef_time.minute = exploded.minute; | ||||
|   | ||||
| @@ -94,9 +94,7 @@ void CreateCookie(CefRefPtr<CefCookieManager> manager, | ||||
|   cookie.has_expires = true; | ||||
|   cookie.expires.year = 2200; | ||||
|   cookie.expires.month = 4; | ||||
| #if !defined(OS_MACOSX) | ||||
|   cookie.expires.day_of_week = 5; | ||||
| #endif | ||||
|   cookie.expires.day_of_month = 11; | ||||
|  | ||||
|   CookieVector cookies; | ||||
| @@ -131,9 +129,7 @@ void GetCookie(CefRefPtr<CefCookieManager> manager, | ||||
|   EXPECT_TRUE(cookie_read.has_expires); | ||||
|   EXPECT_EQ(cookie.expires.year, cookie_read.expires.year); | ||||
|   EXPECT_EQ(cookie.expires.month, cookie_read.expires.month); | ||||
| #if !defined(OS_MACOSX) | ||||
|   EXPECT_EQ(cookie.expires.day_of_week, cookie_read.expires.day_of_week); | ||||
| #endif | ||||
|   EXPECT_EQ(cookie.expires.day_of_month, cookie_read.expires.day_of_month); | ||||
|   EXPECT_EQ(cookie.expires.hour, cookie_read.expires.hour); | ||||
|   EXPECT_EQ(cookie.expires.minute, cookie_read.expires.minute); | ||||
|   | ||||
| @@ -292,9 +292,7 @@ class V8TestHandler : public TestHandler { | ||||
|     CefTime date; | ||||
|     date.year = 2200; | ||||
|     date.month = 4; | ||||
| #if !defined(OS_MACOSX) | ||||
|     date.day_of_week = 5; | ||||
| #endif | ||||
|     date.day_of_month = 11; | ||||
|     date.hour = 20; | ||||
|     date.minute = 15; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user