Skip to content

Commit

Permalink
use no-sandbox option for chrome and adjust permissions for /dev/shm …
Browse files Browse the repository at this point in the history
…for travis build
  • Loading branch information
twalpole committed Nov 18, 2013
1 parent f4af487 commit addecfa
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Expand Up @@ -26,6 +26,7 @@ before_install:
- sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' - sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
- sudo apt-get update - sudo apt-get update
- sudo apt-get install google-chrome-stable - sudo apt-get install google-chrome-stable
- sudo chmod 1777 /dev/shm
before_script: before_script:
- sh -e /etc/init.d/xvfb start - sh -e /etc/init.d/xvfb start
- export DISPLAY=:99.0 - export DISPLAY=:99.0
Expand Down
2 changes: 1 addition & 1 deletion lib/capybara/spec/session/fill_in_spec.rb
Expand Up @@ -57,7 +57,7 @@
extract_results(@session)['description'].should == 'is <strong>very</strong> secret!' extract_results(@session)['description'].should == 'is <strong>very</strong> secret!'
end end


it "should handle newlines in a textarea", tw: true do it "should handle newlines in a textarea" do
@session.fill_in('form_description', :with => "\nSome text\n") @session.fill_in('form_description', :with => "\nSome text\n")
@session.click_button('awesome') @session.click_button('awesome')
extract_results(@session)['description'].should == "\r\nSome text\r\n" extract_results(@session)['description'].should == "\r\nSome text\r\n"
Expand Down
3 changes: 2 additions & 1 deletion spec/selenium_spec_chrome.rb
@@ -1,7 +1,8 @@
require 'spec_helper' require 'spec_helper'


Capybara.register_driver :selenium_chrome do |app| Capybara.register_driver :selenium_chrome do |app|
Capybara::Selenium::Driver.new(app, :browser => :chrome) args = ENV['TRAVIS'] ? ['no-sandbox' ] : []
Capybara::Selenium::Driver.new(app, :browser => :chrome, :args => args)
end end


class ChromeTestApp < TestApp class ChromeTestApp < TestApp
Expand Down

0 comments on commit addecfa

Please sign in to comment.