diff --git a/rb/lib/selenium/webdriver/chrome/service.rb b/rb/lib/selenium/webdriver/chrome/service.rb index 8a689c95ae8bf..9c88259f22288 100644 --- a/rb/lib/selenium/webdriver/chrome/service.rb +++ b/rb/lib/selenium/webdriver/chrome/service.rb @@ -81,10 +81,8 @@ def stop http.get("/shutdown") end - @process.poll_for_exit STOP_TIMEOUT - rescue ChildProcess::TimeoutError ensure - @process.stop STOP_TIMEOUT + stop_process end def uri @@ -105,6 +103,12 @@ def start_process @process.start end + def stop_process + @process.poll_for_exit STOP_TIMEOUT + rescue ChildProcess::TimeoutError + @process.stop STOP_TIMEOUT + end + def connect_until_stable socket_poller = SocketPoller.new @host, @port, START_TIMEOUT diff --git a/rb/spec/integration/selenium/webdriver/chrome/driver_spec.rb b/rb/spec/integration/selenium/webdriver/chrome/driver_spec.rb index 585dbdbda3d4f..b576485386504 100644 --- a/rb/spec/integration/selenium/webdriver/chrome/driver_spec.rb +++ b/rb/spec/integration/selenium/webdriver/chrome/driver_spec.rb @@ -26,17 +26,15 @@ module Chrome compliant_on :browser => :chrome do describe Driver do - not_compliant_on :ci => :travis do - it "should accept an array of custom command line arguments" do - begin - driver = Selenium::WebDriver.for :chrome, :args => ["--user-agent=foo;bar"] - driver.navigate.to url_for("click_jacker.html") - - ua = driver.execute_script "return window.navigator.userAgent" - expect(ua).to eq("foo;bar") - ensure - driver.quit if driver - end + it "should accept an array of custom command line arguments" do + begin + driver = Selenium::WebDriver.for :chrome, :args => ["--user-agent=foo;bar"] + driver.navigate.to url_for("click_jacker.html") + + ua = driver.execute_script "return window.navigator.userAgent" + expect(ua).to eq("foo;bar") + ensure + driver.quit if driver end end @@ -46,9 +44,7 @@ module Chrome }.to raise_error(ArgumentError) end - not_compliant_on :ci => :travis do - it_behaves_like "driver that can be started concurrently", :chrome - end + it_behaves_like "driver that can be started concurrently", :chrome end end