webkit_remote 0.5.4 → 0.5.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/webkit_remote/process.rb +3 -1
- data/test/webkit_remote/process_test.rb +19 -0
- data/webkit_remote.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3cabab3d3bcf6ae1ce28f16c36d9ed30380702ea
|
4
|
+
data.tar.gz: b348748fbef56b36f1e29bae10cad76dd267d127
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0a1c6f937194109f5d8c8de7e701b9b0806ced203cd6d6f3611f49ea198fd4ebf2f783cc4adae6578a2cee5d62747510a8e02ae9c4bf1dc24d19ef9176b2090c
|
7
|
+
data.tar.gz: 1ccb8933bd32fd43cdeb961e2b54b88032f47d813bdee7716cc2bc7494fbb8fb76e32a65083dc37e2955fed3f13ab91180de2f2f74b65a0ca0f6b9371b5311bb
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.5.
|
1
|
+
0.5.5
|
@@ -24,6 +24,8 @@ class Process
|
|
24
24
|
# @option opts [Boolean] allow_popups when true, the popup blocker is
|
25
25
|
# disabled; this is sometimes necessary when driving a Web UI via
|
26
26
|
# JavaScript
|
27
|
+
# @option opts [String] chrome_binary path to the Chrome binary to be used;
|
28
|
+
# by default, the path is automatically detected
|
27
29
|
def initialize(opts = {})
|
28
30
|
@port = opts[:port] || 9292
|
29
31
|
@timeout = opts[:timeout] || 10
|
@@ -150,7 +152,7 @@ class Process
|
|
150
152
|
# http://peter.sh/experiments/chromium-command-line-switches/
|
151
153
|
[
|
152
154
|
chrome_env(opts),
|
153
|
-
self.class.chrome_binary,
|
155
|
+
opts[:chrome_binary] || self.class.chrome_binary,
|
154
156
|
] + chrome_cli_flags(opts) + [
|
155
157
|
"--remote-debugging-port=#{@port}", # Webkit remote debugging
|
156
158
|
"--user-data-dir=#{@data_dir}", # really ensure a clean slate
|
@@ -105,4 +105,23 @@ describe WebkitRemote::Process do
|
|
105
105
|
end
|
106
106
|
end
|
107
107
|
end
|
108
|
+
|
109
|
+
describe 'with invalid chrome_binary path' do
|
110
|
+
before :each do
|
111
|
+
@process = WebkitRemote::Process.new port: 9669,
|
112
|
+
chrome_binary: '/bin/non_existing_binary'
|
113
|
+
end
|
114
|
+
after :each do
|
115
|
+
@process.stop if @process
|
116
|
+
end
|
117
|
+
|
118
|
+
it 'raises an exception' do
|
119
|
+
begin
|
120
|
+
@process.start
|
121
|
+
fail 'no exception raised'
|
122
|
+
rescue SystemCallError => e
|
123
|
+
e.message.must_match(/non_existing_binary/)
|
124
|
+
end
|
125
|
+
end
|
126
|
+
end
|
108
127
|
end
|
data/webkit_remote.gemspec
CHANGED