From addecfadd081bda9384fcf92ddf25327378ffe4a Mon Sep 17 00:00:00 2001 From: Thomas Walpole Date: Mon, 18 Nov 2013 12:47:05 -0800 Subject: [PATCH] use no-sandbox option for chrome and adjust permissions for /dev/shm for travis build --- .travis.yml | 1 + lib/capybara/spec/session/fill_in_spec.rb | 2 +- spec/selenium_spec_chrome.rb | 3 ++- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index e62013a5d..f46c80d35 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 apt-get update - sudo apt-get install google-chrome-stable + - sudo chmod 1777 /dev/shm before_script: - sh -e /etc/init.d/xvfb start - export DISPLAY=:99.0 diff --git a/lib/capybara/spec/session/fill_in_spec.rb b/lib/capybara/spec/session/fill_in_spec.rb index 3bc051a36..5b2daabf1 100644 --- a/lib/capybara/spec/session/fill_in_spec.rb +++ b/lib/capybara/spec/session/fill_in_spec.rb @@ -57,7 +57,7 @@ extract_results(@session)['description'].should == 'is very secret!' 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.click_button('awesome') extract_results(@session)['description'].should == "\r\nSome text\r\n" diff --git a/spec/selenium_spec_chrome.rb b/spec/selenium_spec_chrome.rb index e1ece5941..37290087d 100644 --- a/spec/selenium_spec_chrome.rb +++ b/spec/selenium_spec_chrome.rb @@ -1,7 +1,8 @@ require 'spec_helper' 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 class ChromeTestApp < TestApp