diff options
author | Rémy Coutable <remy@rymai.me> | 2017-06-08 11:55:07 +0200 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-06-12 19:00:03 +0200 |
commit | 448fc23e4743198f2c1bf3cd10eb515eeb9f424b (patch) | |
tree | d26521068afb92ef87384e42dad45c60991d8396 /features | |
parent | 194c40df208526d5dc4401bc06f91d803def3740 (diff) | |
download | gitlab-ce-448fc23e4743198f2c1bf3cd10eb515eeb9f424b.tar.gz |
Let PhantomJS load local imagesrc/load-images-in-phantomjs
This change fix a memory leak due to a Webkit bug:
https://github.com/ariya/phantomjs/issues/12903
Also:
- Whitelist only localhost and 127.0.0.1 in Capybara + JS specs
- Blacklist all requests to media such as images, videos, PDFs, CSVs etc.
- Log all the requests made.
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'features')
-rw-r--r-- | features/support/capybara.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/features/support/capybara.rb b/features/support/capybara.rb index 6da8aaac6cb..f4691647d4b 100644 --- a/features/support/capybara.rb +++ b/features/support/capybara.rb @@ -11,8 +11,10 @@ Capybara.register_driver :poltergeist do |app| js_errors: true, timeout: timeout, window_size: [1366, 768], + url_whitelist: %w[localhost 127.0.0.1], + url_blacklist: %w[.mp4 .png .gif .avi .bmp .jpg .jpeg], phantomjs_options: [ - '--load-images=no' + '--load-images=yes' ] ) end |