summaryrefslogtreecommitdiff
path: root/test/win32ole
diff options
context:
space:
mode:
authorsuke <suke@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-11 11:15:43 +0000
committersuke <suke@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-11 11:15:43 +0000
commit73412af59a8327923ed0f7ae91efbb6c4f0c0b80 (patch)
tree8b582b4c782e9daa6c5dfff53d8b03d2487d1619 /test/win32ole
parentd51b0615658aeb4c62a6437e43fb6aefa5d7df9e (diff)
* test/win32ole/test_err_in_callback.rb (teardown): get rid
of infinite loop. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19296 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/win32ole')
-rw-r--r--test/win32ole/test_err_in_callback.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/win32ole/test_err_in_callback.rb b/test/win32ole/test_err_in_callback.rb
index 710d365..c223804 100644
--- a/test/win32ole/test_err_in_callback.rb
+++ b/test/win32ole/test_err_in_callback.rb
@@ -52,13 +52,16 @@ if defined?(WIN32OLE)
end
def ie_quit
+ WIN32OLE_EVENT.message_loop
sh = WIN32OLE.new('Shell.Application')
sh.windows.each do |w|
i = 0
begin
i = i + 1
+ next if i > 100
WIN32OLE_EVENT.message_loop
sleep 0.1
+ next if /#{@dummy_file}/ !~ w.locationURL
e = w.document.all.item("str")
if e && e.innerHTML == @str
w.quit
@@ -66,7 +69,6 @@ if defined?(WIN32OLE)
sleep 0.2
break
end
- next if i > 1000
rescue
retry
end