<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - WKWebsiteDataStore does not always clear cookies"
   href="https://bugs.webkit.org/show_bug.cgi?id=147635">147635</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>WKWebsiteDataStore does not always clear cookies
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>WebKit
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>528+ (Nightly build)
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Unspecified
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Unspecified
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>Normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P2
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>WebKit2
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>webkit-unassigned&#64;lists.webkit.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>shreyasv&#64;chromium.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>WKWebsiteDataStore does not clear cookies in the following scenarios:
1) WKWebView has been just created
2) There is no WKWebView attached to the WKWebViewConfiguration

(there maybe more scenarios, these are the known ones)


Sample code to run:

WKWebViewConfiguration* config = [[WKWebViewConfiguration alloc] init];
  self.webView =
      [[WKWebView alloc] initWithFrame:CGRectZero configuration:config];

  [self.view addSubview:self.webView];

  NSString* url = &#64;&quot;<a href="http://google.com">http://google.com</a>&quot;;
  [self.webView loadRequest:
      [NSURLRequest requestWithURL:[NSURL URLWithString:url]]];

// Trigger clearing of cookies.
 [self.webView.configuration.websiteDataStore removeDataOfTypes:[NSSet setWithObject:WKWebsiteDataTypeCookies]
                                                     modifiedSince:[NSDate distantPast] completionHandler:^{
                                                       // Notice that this is not called.
                                                       NSLog(&#64;&quot;Cleared cookies&quot;);
                                                     }];

Expected Results:
The completion handler is called and cookies are cleared.

Actual Results:
The completion handler is not called and cookies are not cleared.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>