Make newWindowRequest API more QML friendly, created unit test for that