fix bugs of useragentapp and pathescape test cases
[test] test case for #486: Application Crash when quitting with secondary window on top
Merge pull request #1010 from richardcypher/appescape

[test]fix bugs of useragentapp and pathescape test cases
Merge pull request #1011 from kingFighter/test-case-#486

[test] test case for #486: Application Crash when quitting with secondary window on top