-
Notifications
You must be signed in to change notification settings - Fork 27.4k
fix($$RAFProvider): check for webkitCancelRequestAnimationFrame. #6542
Conversation
Thanks for the PR! Please check the items below to help us merge this faster. See the contributing docs for more information.
If you need to make changes to your pull request, you can update the commit with Thanks again for your help! |
Hi, |
Heya, I'm currently facing problems on how to test the different rAF implementations. I started with adding a spy like that: beforeEach(module(function($provide) {
$provide.value('$window', {
requestAnimationFrame: jasmine.createSpy('$window.requestAnimationFrame')
});
})); but |
Is there an Android browser included in the E2E tests? Otherwise the situation where it is needed would not arise. I don't see one listed: https://github.com/angular/angular.js/blob/master/karma-shared.conf.js |
We don't, but it looks like SL will let us test on a couple of more recent android platforms, and some iOS platforms, so it should be easy to hook those in. Want to analyze the costs and send a PR with the configuration changes and that info? Or maybe it would be better if someone internal looked at doing that (or maybe for 1.x we just don't care, but we'll probably want this for 2.x) |
Sure thing! |
PR opened #6578 |
@Traxmaxx The problem is that angular-mocks contains a mock implementation of For Applying this to rAF: Add a top level function E.g. change Note that this is working as during the unit tests of Angular we don't add the surrounding function closure of Angular, so unit tests are able to access all the details of Angular. |
@tbosch thanks for the detailed explanation : ) |
@Traxmaxx could you copy the test spec from here? This way you don't have to rewrite |
Of course! I'll take care of it. |
@Traxmaxx any progress? |
Android 4.3 only supports webkitCancelRequestAnimationFrame. Closes angular#6526
@matsko fixed and pushed : ) |
MERGED |
Request Type: bug
How to reproduce: Use AngularJS 1.2.14 together with ngAnimate in Cordova/PhoneGap WebView on Android 4.3
Component(s): ngAnimate
Impact: small
Complexity: small
This issue is related to:
Detailed Description:
RAFProvider is checking for
cancelAnimationFrame
andwebkitCancelAnimationFrame
( seeangular.js/src/ng/raf.js
Line 8 in 04d7317
For Android 4.3 we need to check for
webkitCancelRequestAnimationFrame
too, otherwise the animations will fail.Other Comments:
No breaking changes, closes #6526