use window to get permission state
Test should work with new filename
Comment updated in test