Skip to content

Instantly share code, notes, and snippets.

View jarib's full-sized avatar

Jari Bakken jarib

View GitHub Profile
/*
* (c) 1995 Microsoft Corporation. All rights reserved.
* Developed by ActiveWare Internet Corp., http://www.ActiveWare.com
*
* Other modifications Copyright (c) 1997, 1998 by Gurusamy Sarathy
* <[email protected]> and Jan Dubois <[email protected]>
*
* You may distribute under the terms of either the GNU General Public
* License or the Artistic License, as specified in the README file
* of the Perl distribution.
diff --git a/ext/win32ole/win32ole.c b/ext/win32ole/win32ole.c
index dc1b77d..51f6b58 100644
--- a/ext/win32ole/win32ole.c
+++ b/ext/win32ole/win32ole.c
@@ -12,16 +12,22 @@
*/
/*
- $Date$
modified for win32ole (ruby) by Masaki.Suketa <[email protected]>
def seconds_to_s(seconds)
seconds = seconds.round
s = seconds % 60
m = (seconds /= 60) % 60
h = (seconds /= 60) % 24
d = (seconds /= 24)
out = []
out << "#{d}d" if d > 0
out << "#{h}h" if h > 0
out << "#{m}m" if m > 0
require "rubygems"
require "spec/autorun"
Spec::Runner.configure do |config|
config.before(:all) { puts "before all" }
end
describe "parent describe" do
describe "child describe 1" do
require "rubygems"
require "celerity"
c = Celerity::Browser.new :log_level => :off
c.goto "google.com"
p :url => c.url
page = c.page
c.goto "yahoo.com"
require "rubygems"
require "spec/autorun"
%w[foo baar baazs].each do |thing|
describe "my thing" do
it "should be larger than 4 chars" do
thing.size.should > 4
end
require "rubygems"
require "spec/autorun"
%w[foo baar baazs].each do |thing|
describe "my thing, at the moment #{thing.inspect}" do
it "should be larger than 4 chars" do
thing.size.should > 4
end
browser = Celerity::Browser.new(:resynchronize => true, :log_level => :off)
browser.goto('testteststest.com')
linkz = browser.links.map { |e| e.href if e.href =~ /gotoJavaScriptFunction/ }.compact
linkz.each do |linke|
linke.click
puts browser.xml
puts "="*80 # separator
browser = Celerity::Browser.new(:resynchronize => true, :log_level => :off)
browser.goto('testteststest.com')
urlz = browser.links.map { |e| e.href if e.href =~ /gotoJavaScriptFunction/ }.compact
urlz.each do |url|
browser.link(:url, url).click
puts browser.xml
puts "="*80 # separator
sleep 5
end
# -------------------------------------------------
# Project created by QtCreator 2009-08-11T03:43:25
# -------------------------------------------------
QT += network webkit # testlib
TARGET = QtCelerityViewer
TEMPLATE = app
INCLUDEPATH += lib/qjson/src
SOURCES += src/main.cpp \
src/mainwindow.cpp \
src/viewer.cpp \