Skip to content

Commit

Permalink
Added support for WebKit nightly builds
Browse files Browse the repository at this point in the history
Signed-off-by: Tobie Langel <tobie.langel@gmail.com>
  • Loading branch information
rfletcher authored and tobie committed Mar 21, 2009
1 parent fefb554 commit ba287e7
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/unittest_js/browsers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

module UnittestJS
module Browser
SUPPORTED = %w[chrome firefox ie konqueror opera safari].freeze
SUPPORTED = %w[chrome firefox ie konqueror opera safari webkit].freeze
end
end

Expand Down
6 changes: 3 additions & 3 deletions lib/unittest_js/browsers/safari.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ def supported?
end

def setup
applescript('tell application "Safari" to make new document')
applescript('tell application "' + to_s + '" to make new document')
end

def visit(url)
applescript('tell application "Safari" to set URL of front document to "' + url + '"')
applescript('tell application "' + to_s + '" to set URL of front document to "' + url + '"')
end

def teardown
#applescript('tell application "Safari" to close front document')
#applescript('tell application "' + to_s + '" to close front document')
end

def to_s
Expand Down
9 changes: 9 additions & 0 deletions lib/unittest_js/browsers/webkit.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module UnittestJS
module Browser
class WebKit < UnittestJS::Browser::Safari
def to_s
"WebKit"
end
end
end
end
2 changes: 2 additions & 0 deletions lib/unittest_js/webrick_runner/runner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ def add_browser(browser)
Browser::Opera.new
when :chrome
Browser::Chrome.new
when :webkit
Browser::WebKit.new
else
browser
end
Expand Down

0 comments on commit ba287e7

Please sign in to comment.