Title: [231999] trunk/Tools
- Revision
- 231999
- Author
- [email protected]
- Date
- 2018-05-19 13:57:02 -0700 (Sat, 19 May 2018)
Log Message
Flaky API test WebKit.WKHTTPCookieStoreWithoutProcessPool: incorrect order of cookies
https://bugs.webkit.org/show_bug.cgi?id=185624
<rdar://problem/39111626>
Reviewed by Chris Dumez.
Modified expectation to make test more robust as cookies can be returned in different orders.
* TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm:
(-[CookieUIDelegate webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:]):
(TEST):
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (231998 => 231999)
--- trunk/Tools/ChangeLog 2018-05-19 20:21:30 UTC (rev 231998)
+++ trunk/Tools/ChangeLog 2018-05-19 20:57:02 UTC (rev 231999)
@@ -1,3 +1,17 @@
+2018-05-19 Sihui Liu <[email protected]>
+
+ Flaky API test WebKit.WKHTTPCookieStoreWithoutProcessPool: incorrect order of cookies
+ https://bugs.webkit.org/show_bug.cgi?id=185624
+ <rdar://problem/39111626>
+
+ Reviewed by Chris Dumez.
+
+ Modified expectation to make test more robust as cookies can be returned in different orders.
+
+ * TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm:
+ (-[CookieUIDelegate webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:]):
+ (TEST):
+
2018-05-18 Commit Queue <[email protected]>
Unreviewed, rolling out r231982.
Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm (231998 => 231999)
--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm 2018-05-19 20:21:30 UTC (rev 231998)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm 2018-05-19 20:57:02 UTC (rev 231999)
@@ -33,6 +33,7 @@
#import <WebKit/WKWebsiteDataStorePrivate.h>
#import <WebKit/_WKWebsiteDataStoreConfiguration.h>
#import <wtf/RetainPtr.h>
+#import <wtf/text/WTFString.h>
#if WK_API_ENABLED
@@ -376,7 +377,8 @@
@implementation CookieUIDelegate
- (void)webView:(WKWebView *)webView runJavaScriptAlertPanelWithMessage:(NSString *)message initiatedByFrame:(WKFrameInfo *)frame completionHandler:(void (^)(void))completionHandler
{
- EXPECT_STREQ("cookie:PersistentCookieName=CookieValue; SessionCookieName=CookieValue", message.UTF8String);
+ auto cookies = String(message.UTF8String);
+ ASSERT_TRUE(cookies == "PersistentCookieName=CookieValue; SessionCookieName=CookieValue" || cookies == "SessionCookieName=CookieValue; PersistentCookieName=CookieValue");
finished = true;
completionHandler();
}
@@ -397,7 +399,7 @@
NSHTTPCookieDomain: @"127.0.0.1",
NSHTTPCookieExpires: [NSDate distantFuture],
}];
- NSString *alertCookieHTML = @"<script>alert('cookie:'+document.cookie);</script>";
+ NSString *alertCookieHTML = @"<script>alert(document.cookie);</script>";
// NonPersistentDataStore
RetainPtr<WKWebsiteDataStore> ephemeralStoreWithCookies = [WKWebsiteDataStore nonPersistentDataStore];
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes