Skip to content
This repository has been archived by the owner on Nov 27, 2020. It is now read-only.

Integration of onResourceRequested (Issue #403) #438

Closed
wants to merge 6 commits into from
Closed

Integration of onResourceRequested (Issue #403) #438

wants to merge 6 commits into from

Conversation

alexanderadam
Copy link

This is the result from #403 and "reactivates" the onResourceRequested functionality from phantomjs.
In the spec ( https://github.com/alexanderadam/poltergeist/blob/c27d9b279fdb579bf3c5b95b24ed6a9e31a431b4/spec/integration/driver_spec.rb#L710 ) you can see how you can control the accepting/blocking of a request.
The request will just be blocked if there is a JavaScript snippet given and it returns a falsy value.

+ Attention: Capybara::Poltergeist::TimeoutError is thrown if you block a resource for now
* blocked request are stored now
* a blocked iframe won't result in a timeout now
Conflicts:
	lib/capybara/poltergeist/browser.rb
	spec/integration/driver_spec.rb
@jbaudanza
Copy link
Contributor

👍

@antifarben
Copy link

Sorry, my last commit ( a23cfab ) obviously broke it somehow. 😟
I will investigate into the issue in the following days.

@antifarben
Copy link

Fixed ☺️

@thedelchop
Copy link
Contributor

@antifarben and @alexanderadam can we squash this into less than 6 commits and rebase it against upstream?

@antifarben
Copy link

Sure. I also created a branch with a single commit against latest master which even could look cleaner.
If you want I create a PR with just this ( https://github.com/alexanderadam/poltergeist/commit/0623ec0790bab10cfb561a776325b30ac63a64d5 ).

PS: Wrong account. Sorry for the confusion: @alexanderadam & @antifarben are both mine but for different purposes.

@thedelchop
Copy link
Contributor

@antifarben @alexanderadam Yeah if you can squash this into a single commit and rebase it I'll get it in.

@alexanderadam
Copy link
Author

Just to be sure: the other pr could be found here

@route
Copy link
Contributor

route commented Aug 6, 2014

@yaauie I'd be glad to hear from you about it...

@alexanderadam
Copy link
Author

closed in favor of PR 486

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants