Commit 41bad1f9 authored by Robert Knight's avatar Robert Knight

Add test for handling of `frameDestroyed` event from guest in host frame

parent 4b021476
...@@ -496,6 +496,23 @@ describe('Sidebar', () => { ...@@ -496,6 +496,23 @@ describe('Sidebar', () => {
assert.calledWith(sidebar.bucketBar.update, anchorPositions); assert.calledWith(sidebar.bucketBar.update, anchorPositions);
}); });
}); });
describe('on "frameDestroyed" event', () => {
it('disconnects the guest', () => {
const sidebar = createSidebar();
connectGuest(sidebar);
guestRPC().call.resetHistory();
emitGuestEvent('frameDestroyed');
assert.called(guestRPC().destroy);
// Trigger a notification to all connected guests. This should no longer
// be sent to the guest that has just been disconnected.
sidebar.open();
assert.notCalled(guestRPC().call);
});
});
}); });
describe('pan gestures', () => { describe('pan gestures', () => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment