[ 
https://issues.apache.org/jira/browse/CB-382?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13406827#comment-13406827
 ] 

Andrew Grieve commented on CB-382:
----------------------------------

Some initial investigations into this reveal that using:

while (!loaded) {
  [[NSRunLoop currentRunLoop] runUntilDate:[NSDate 
dateWithTimeIntervalSinceNow:0.01]];
}

Will cause the webview to finish loading. Also, a second call to it is required 
after executing a localStorage.setItem() in order for the file__0.localstorage 
file to be written to disk.

I'll put together a unit test base class using this technique as well as some 
tests for CDVLocalStorage.
                
> [iOS] Create tests for CDVLocalStorage core plugin
> --------------------------------------------------
>
>                 Key: CB-382
>                 URL: https://issues.apache.org/jira/browse/CB-382
>             Project: Apache Cordova
>          Issue Type: Test
>          Components: iOS
>    Affects Versions: 1.6.0
>            Reporter: Shazron Abdullah
>            Assignee: Shazron Abdullah
>             Fix For: 2.0.0
>
>
> Can't get a delay for UIWebViewDelegate::webViewDidStartLoad before 
> unit-tests run - postponing this

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to