summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicoleYarroch <nicole@livio.io>2018-03-02 08:29:38 -0500
committerNicoleYarroch <nicole@livio.io>2018-03-02 08:29:38 -0500
commit941762d95e9c08474c81b361b92370005ea0174e (patch)
tree438b28ab0455a24cd78de5de6cd8e8ae2fa7802f
parentb6f5309a8385ca23f147d301f14e9d145f1d92f0 (diff)
downloadsdl_ios-941762d95e9c08474c81b361b92370005ea0174e.tar.gz
Fixed some of the pinch gesture test cases
-rw-r--r--SmartDeviceLink/SDLTouchManager.m4
-rw-r--r--SmartDeviceLinkTests/SDLStreamingMediaLifecycleManagerSpec.m9
2 files changed, 8 insertions, 5 deletions
diff --git a/SmartDeviceLink/SDLTouchManager.m b/SmartDeviceLink/SDLTouchManager.m
index b411619f1..1d0c0b795 100644
--- a/SmartDeviceLink/SDLTouchManager.m
+++ b/SmartDeviceLink/SDLTouchManager.m
@@ -291,9 +291,11 @@ static NSUInteger const MaximumNumberOfTouches = 2;
dispatch_async(dispatch_get_main_queue(), ^{
UIView *hitView = (self.hitTester != nil) ? [self.hitTester viewForPoint:self.currentPinchGesture.center] : nil;
[self.touchEventDelegate touchManager:self pinchDidEndInView:hitView atCenterPoint:self.currentPinchGesture.center];
+ self.currentPinchGesture = nil;
});
+ } else {
+ self.currentPinchGesture = nil;
}
- self.currentPinchGesture = nil;
}
} break;
case SDLPerformingTouchTypePanningTouch: {
diff --git a/SmartDeviceLinkTests/SDLStreamingMediaLifecycleManagerSpec.m b/SmartDeviceLinkTests/SDLStreamingMediaLifecycleManagerSpec.m
index 911a44436..0ea63be4d 100644
--- a/SmartDeviceLinkTests/SDLStreamingMediaLifecycleManagerSpec.m
+++ b/SmartDeviceLinkTests/SDLStreamingMediaLifecycleManagerSpec.m
@@ -255,10 +255,11 @@ describe(@"the streaming media manager", ^{
[streamingLifecycleManager.appStateMachine setToState:SDLAppStateInactive fromOldState:nil callEnterTransition:YES];
});
- it(@"should flag to restart the video stream", ^{
- expect(@(streamingLifecycleManager.shouldRestartVideoStream)).to(equal(@YES));
- expect(streamingLifecycleManager.currentAudioStreamState).to(equal(SDLAudioStreamStateReady));
- expect(streamingLifecycleManager.currentVideoStreamState).to(equal(SDLVideoStreamStateReady));
+ it(@"should shut down the video stream", ^{
+ expect(@(streamingLifecycleManager.shouldRestartVideoStream)).to(beFalse());
+
+ expect(streamingLifecycleManager.currentAudioStreamState).to(equal(SDLAudioStreamStateShuttingDown));
+ expect(streamingLifecycleManager.currentVideoStreamState).to(equal(SDLVideoStreamStateShuttingDown));
});
});
});