[webkit-dev] Is there a (JavaScript) to test out WebUIDelegate?

Daryle Walker darylew at mac.com
Wed Aug 6 19:00:31 PDT 2014


I’m trying out Cocoa with a mini web-browser project.  My document class holding a WebView object implements the WebUIDelegate informal protocol.  I could test out webView:createWebViewWithRequest: by visiting a page that sends all links to a new window/tab.  Twitter is a good example of this.  It was a pain finding a page with Javascript-generated messages to the status bar, needed to test webView:setStatusText:.  Is there a JavaScript test suite so I can try triggering any of the other WebUIDelegate calls.  So far I need:

//=====
- (WebView *)webView:(WebView *)sender createWebViewWithRequest:(NSURLRequest *)request;  // click links on Twitter
- (void)webViewShow:(WebView *)sender;  // need a case that doesn’t call webView:createWebViewWithRequest: first
- (void)webView:(WebView *)sender setStatusText:(NSString *)text;  // went to a JavaScript demo on status-bar messages
- (NSString *)webViewStatusText:(WebView *)sender;
- (BOOL)webViewIsStatusBarVisible:(WebView *)sender;
- (void)webView:(WebView *)sender setStatusBarVisible:(BOOL)visible;
//=====

I need a way to test the second function since it and the first function are usually called together, but my implementation of the first function automatically calls its own version of the second.  So I need a way to call the second function by itself.

— 
Daryle Walker
Mac, Internet, and Video Game Junkie
darylew AT mac DOT com 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-dev/attachments/20140806/a788cf22/attachment.html>


More information about the webkit-dev mailing list