cleaning up the test/private-browsng/windows.js tests by using promises