Updates to modal tests.

Add onunload tests.

Make other modal tests independently runnable.