fix($route): make asynchronous tasks count as pending requests
Protractor users were having a problem where if they had asynchonous code in a `route.resolve` or `route.resolveRedirectTo` variable, Protractor was not waiting for that code to complete before continuing. See https://github.com/angular/protractor/issues/789#issuecomment-190983200 for details. This commit fixes it by ensuring that `$browser#outstandingRequestCount` is properly increased/decreased while `$route` (asynchronously) processes a route. Also, enhanced `ngMock` to wait for pending requests, before calling callbacks from `$browser.notifyWhenNoOutstandingRequests()`. Related to angular/protractor#789. Closes #14159
S
Sammy Jelin committed
eb968c4a6884838db05369a04459066424c5bba8
Parent: 7f2af3f
Committed by Georgios Kalpakas <kalpakas.g@gmail.com>
on 1/11/2017, 10:15:20 PM