Title: [231495] trunk
Revision
231495
Author
[email protected]
Date
2018-05-08 11:27:24 -0700 (Tue, 08 May 2018)

Log Message

Unreviewed, rolling out r231491.
https://bugs.webkit.org/show_bug.cgi?id=185434

Setting the Created key on a cookie does not work yet, due a
bug in CFNetwork (Requested by ggaren on #webkit).

Reverted changeset:

"[WKHTTPCookieStore getAllCookies] returns inconsistent
creation time"
https://bugs.webkit.org/show_bug.cgi?id=185041
https://trac.webkit.org/changeset/231491

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (231494 => 231495)


--- trunk/Source/WebCore/ChangeLog	2018-05-08 18:05:12 UTC (rev 231494)
+++ trunk/Source/WebCore/ChangeLog	2018-05-08 18:27:24 UTC (rev 231495)
@@ -1,3 +1,18 @@
+2018-05-08  Commit Queue  <[email protected]>
+
+        Unreviewed, rolling out r231491.
+        https://bugs.webkit.org/show_bug.cgi?id=185434
+
+        Setting the Created key on a cookie does not work yet, due a
+        bug in CFNetwork (Requested by ggaren on #webkit).
+
+        Reverted changeset:
+
+        "[WKHTTPCookieStore getAllCookies] returns inconsistent
+        creation time"
+        https://bugs.webkit.org/show_bug.cgi?id=185041
+        https://trac.webkit.org/changeset/231491
+
 2018-05-08  Sihui Liu  <[email protected]>
 
         [WKHTTPCookieStore getAllCookies] returns inconsistent creation time

Modified: trunk/Source/WebCore/platform/network/cocoa/CookieCocoa.mm (231494 => 231495)


--- trunk/Source/WebCore/platform/network/cocoa/CookieCocoa.mm	2018-05-08 18:05:12 UTC (rev 231494)
+++ trunk/Source/WebCore/platform/network/cocoa/CookieCocoa.mm	2018-05-08 18:27:24 UTC (rev 231495)
@@ -82,7 +82,7 @@
     if (isNull())
         return nil;
 
-    NSMutableDictionary *properties = [NSMutableDictionary dictionaryWithCapacity:13];
+    NSMutableDictionary *properties = [NSMutableDictionary dictionaryWithCapacity:12];
 
     if (!comment.isNull())
         [properties setObject:(NSString *)comment forKey:NSHTTPCookieComment];
@@ -106,8 +106,6 @@
     auto maxAge = ceil([expirationDate timeIntervalSinceNow]);
     if (maxAge > 0)
         [properties setObject:[NSString stringWithFormat:@"%f", maxAge] forKey:NSHTTPCookieMaximumAge];
-    
-    [properties setObject:[NSNumber numberWithDouble:created / 1000.0] forKey:@"Created"];
 
     auto* portString = portStringFromVector(ports);
     if (portString)

Modified: trunk/Tools/ChangeLog (231494 => 231495)


--- trunk/Tools/ChangeLog	2018-05-08 18:05:12 UTC (rev 231494)
+++ trunk/Tools/ChangeLog	2018-05-08 18:27:24 UTC (rev 231495)
@@ -1,3 +1,18 @@
+2018-05-08  Commit Queue  <[email protected]>
+
+        Unreviewed, rolling out r231491.
+        https://bugs.webkit.org/show_bug.cgi?id=185434
+
+        Setting the Created key on a cookie does not work yet, due a
+        bug in CFNetwork (Requested by ggaren on #webkit).
+
+        Reverted changeset:
+
+        "[WKHTTPCookieStore getAllCookies] returns inconsistent
+        creation time"
+        https://bugs.webkit.org/show_bug.cgi?id=185041
+        https://trac.webkit.org/changeset/231491
+
 2018-05-08  Valerie R Young  <[email protected]>
 
         test262/Runner.pm: move input files to JSTests/test262

Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm (231494 => 231495)


--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm	2018-05-08 18:05:12 UTC (rev 231494)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm	2018-05-08 18:27:24 UTC (rev 231495)
@@ -33,7 +33,6 @@
 #import <WebKit/WKWebsiteDataStorePrivate.h>
 #import <WebKit/_WKWebsiteDataStoreConfiguration.h>
 #import <wtf/RetainPtr.h>
-#import <wtf/Seconds.h>
 
 #if WK_API_ENABLED
 
@@ -311,59 +310,6 @@
     [cookies release];
 }
 
-TEST(WebKit, WKHTTPCookieStoreCreationTime) 
-{   
-    WKWebsiteDataStore* dataStore = [WKWebsiteDataStore defaultDataStore];
-
-    auto configuration = adoptNS([[WKWebViewConfiguration alloc] init]);
-    configuration.get().websiteDataStore = dataStore;
-    auto webView = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600) configuration:configuration.get()]);
-
-    [webView loadHTMLString:@"WebKit Test" baseURL:[NSURL URLWithString:@"http://webkit.org"]];
-    [webView _test_waitForDidFinishNavigation];
-
-    [dataStore removeDataOfTypes:[WKWebsiteDataStore allWebsiteDataTypes] modifiedSince:[NSDate distantPast] completionHandler:[] {
-        gotFlag = true;
-    }];
-    TestWebKitAPI::Util::run(&gotFlag);
-    gotFlag = false;
-
-    globalCookieStore = dataStore.httpCookieStore;
-
-    RetainPtr<NSHTTPCookie> cookie = [NSHTTPCookie cookieWithProperties:@{
-        NSHTTPCookiePath: @"/path",
-        NSHTTPCookieName: @"CookieName",
-        NSHTTPCookieValue: @"CookieValue",
-        NSHTTPCookieDomain: @".www.webkit.org",
-    }];
-
-    [globalCookieStore setCookie:cookie.get() completionHandler:[]() {
-        gotFlag = true;
-    }];
-    TestWebKitAPI::Util::run(&gotFlag);
-    gotFlag = false;
-
-    RetainPtr<NSNumber> creationTime = nil;
-    [globalCookieStore getAllCookies:[&](NSArray<NSHTTPCookie *> *cookies) {
-        ASSERT_EQ(1u, cookies.count);
-        creationTime = [cookies objectAtIndex:0].properties[@"Created"];
-        gotFlag = true;
-    }];
-    TestWebKitAPI::Util::run(&gotFlag);
-    gotFlag = false;
-
-    sleep(1_s);
-
-    [globalCookieStore getAllCookies:^(NSArray<NSHTTPCookie *> *cookies) {
-        ASSERT_EQ(1u, cookies.count);
-        NSNumber* creationTime2 = [cookies objectAtIndex:0].properties[@"Created"];
-        EXPECT_TRUE([creationTime.get() isEqual:creationTime2]);
-        gotFlag = true;
-    }];
-    TestWebKitAPI::Util::run(&gotFlag);
-    gotFlag = false;
-}
-
 // FIXME: This should be removed once <rdar://problem/35344202> is resolved and bots are updated.
 #if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MAX_ALLOWED <= 101301) || (PLATFORM(IOS) && __IPHONE_OS_VERSION_MAX_ALLOWED <= 110102)
 TEST(WebKit, WKHTTPCookieStoreNonPersistent)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to