Bug 149079 - WKWebView does not evaluate JavaScript after cookies have been cleared
Summary: WKWebView does not evaluate JavaScript after cookies have been cleared
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: Other
Hardware: iPhone / iPad iOS 9.0
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2015-09-11 16:24 PDT by Shreyas VA
Modified: 2015-09-14 11:05 PDT (History)
2 users (show)

See Also:


Attachments
Sample app that repros this bug (42.58 KB, application/zip)
2015-09-11 16:24 PDT, Shreyas VA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Shreyas VA 2015-09-11 16:24:25 PDT
Created attachment 261025 [details]
Sample app that repros this bug

WKWebView does evaluate JavaScript after cookies have been cleared.
This is problematic because the completionHandler from the -[WKWebView evaluateJavaScript:completionHandler:] is never called.

Steps to Reproduce:
1) Run the attached code
2) Click on "wv1", that creates a WKWebView and loads a webpage
3) Click on "clear cookies", that uses the WKWebsiteDataStore API to clear cookies
4) Click on rc, that injects JS to retrieve the cookies from a web page.

Expected Results:
The completionHandler (from the JS eval method) is called.

Actual Results:
The completionHandler (from the JS eval method) is never called.

Version:
iOS9.0
Comment 1 Shreyas VA 2015-09-11 16:26:59 PDT
rdar://22670291
Comment 2 Shreyas VA 2015-09-14 11:05:46 PDT
s/does evaluate/does not evaluate in the description.
Sorry for the typo.