aboutsummaryrefslogtreecommitdiffstats
path: root/test/win32ole/test_win32ole_event.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/win32ole/test_win32ole_event.rb')
-rw-r--r--test/win32ole/test_win32ole_event.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/win32ole/test_win32ole_event.rb b/test/win32ole/test_win32ole_event.rb
index 744021dfd2..79e5b06080 100644
--- a/test/win32ole/test_win32ole_event.rb
+++ b/test/win32ole/test_win32ole_event.rb
@@ -30,6 +30,20 @@ if defined?(WIN32OLE_EVENT)
@event += event
end
+ def test_s_new_without_itf
+ ev = WIN32OLE_EVENT.new(@ie)
+ ev.on_event {|*args| default_handler(*args)}
+ @ie.navigate("file:///#{@f}")
+ while @ie.busy
+ WIN32OLE_EVENT.new(@ie)
+ GC.start
+ WIN32OLE_EVENT.message_loop
+ sleep 0.1
+ end
+ assert_match(/BeforeNavigate/, @event)
+ assert_match(/NavigateComplete/, @event)
+ end
+
def test_on_event
ev = WIN32OLE_EVENT.new(@ie, 'DWebBrowserEvents')
ev.on_event {|*args| default_handler(*args)}