mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-04-05 17:01:19 +08:00
chore($animate): fix broken IE8 test
This commit is contained in:
@@ -1332,12 +1332,7 @@ describe("ngAnimate", function() {
|
||||
}));
|
||||
|
||||
it("should intelligently cancel former timeouts and close off a series of elements a final timeout", function() {
|
||||
var currentTimestamp = Date.now();
|
||||
spyOn(Date,'now').andCallFake(function() {
|
||||
return currentTimestamp;
|
||||
});
|
||||
|
||||
var cancellations = 0;
|
||||
var currentTimestamp, cancellations = 0;
|
||||
module(function($provide) {
|
||||
$provide.decorator('$timeout', function($delegate) {
|
||||
var _cancel = $delegate.cancel;
|
||||
@@ -1349,6 +1344,15 @@ describe("ngAnimate", function() {
|
||||
};
|
||||
return $delegate;
|
||||
});
|
||||
|
||||
return function($sniffer) {
|
||||
if($sniffer.transitions) {
|
||||
currentTimestamp = Date.now();
|
||||
spyOn(Date,'now').andCallFake(function() {
|
||||
return currentTimestamp;
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
inject(function($animate, $rootScope, $compile, $sniffer, $timeout) {
|
||||
if (!$sniffer.transitions) return;
|
||||
|
||||
Reference in New Issue
Block a user