adding parameterized test for ensuring that onclose is called after file is rendered