test Activity's lifecyle , when a dialog showing.