add test cases for type checking in window.open