Test update as tab selection when closing a tab has changed (#6876)

Change-Id: I803e8b1f34e3467bb2027ebfe6bbb01b9e71635c