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

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