Open naugtur opened 8 years ago
Do you have a suggestion how to fix this?
I hoped for "oh it's ajust a minor regression"
But there might be a command line switch that would disable the security restriction on window.close
@juliangruber I have two fixes for this.
run-browser
uses tap-finished
. I made a PoC a change that'd add an option to use it. Not sure what your userbase uses for testing.I can PR both solutions, but I'd rather know which will get accepted before I do ;)
For both solutions I didn't check if browser.kill()
is available in all launchers, but there must be a way to kill a process.
Ah, so you're using this through tape-run?
I'm piping browserify output (or webpack in other repo) to browser-run and then to tap-spec
What I'm hoping to get here is if this is the popular way browser-run is used for testing or not. The timeout option would work with anything that produces output
I guess we can just add another timeout that will kill the browser child_process if window.close() fails
One more idea - if browser-run prints pid of the browser in the first line, an external tool could easily kill the browser based on the output.
Hi - I use tape and browser-run. (I like to use the minimum amount of framework when possible). I would love to see a --close-after-tap (or similar) that shuts down the browser based on tap tests finishing as well.
I could implement that, but it seems like something more generic would be nice... Maybe not just tap, but a 'safeword' anyone could use to finish by console.logging it...
I'll probably have to figure it out some time this month anyway :)
Sounds good. look forward to it!
@mvoss9000 @juliangruber I added a PR for tap-finish
I see following options to move it forward:
FF just says
and wouldn't close.
Env: linux with FF 49.0
Also noticed a tab with sessionrestore whenever I browser-run FF more than once.