[test] Update user-agent test case to cover reload and child window.
Merge pull request #1066 from kingFighter/tests

[test] Update user-agent test case to cover reload and child window.