Permalink
Browse files

More error prototyping

  • Loading branch information...
1 parent ad1dfe3 commit 42fbdab8c38a3fb11111b68bd28fdc80925fafad @alloy alloy committed Apr 12, 2009
Showing with 10 additions and 1 deletion.
  1. +10 −1 lib/js_test_san/test_case.rb
@@ -61,15 +61,24 @@ def webView_didFinishLoadForFrame(_, __)
end
end
- # Catches file load errors:
+ # Catches resource load errors:
#
# webView.resourceLoadDelegate = self
+ #
# def webView_resource_didFailLoadingWithError_fromDataSource(w,r,e,d)
# message = "#{e.userInfo['NSLocalizedDescription']}: #{e.userInfo['NSErrorFailingURLStringKey']}"
# @delegate.test_ran(Test.new(self, "Unable to load test case", :failed, message))
# @delegate.test_case_finished(self)
# end
+ # Logs js errors:
+ #
+ # webView.setUIDelegate(self)
+ #
+ # def webView_addMessageToConsole(_, msg)
+ # p msg
+ # end
+
def handleEvent(event)
element = event.target
case element

0 comments on commit 42fbdab

Please sign in to comment.