mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/win32ole/win32ole.c (find_default_source): try to
find COCLASS when WIN32OLE object is not COCLASS. * test/win32ole/test_win32ole_event.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17956 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
f1d967c6ee
commit
6c32d10c01
3 changed files with 99 additions and 3 deletions
|
@ -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)}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue