Use the same fake User-Agent string as GetContentShell()->GetUserAgent() for...
Use the same fake User-Agent string as GetContentShell()->GetUserAgent() for URLRequestContext in content_shell ShellContentClient::GetUserAgent() returns a fake User-Agent. It's used for navigator.userAgent, loading layout test test case file, etc. But ShellURLRequestContextGetter has an HttpUserAgentSettings with an empty string for User-Agent. Factor out the code to build the fake User-Agent from ShellContentClient::GetUserAgent() into GetShellUserAgent() and use it for ShellURLRequestContextGetter. This is almost the same as how ChromeShellContentClient and ChromeURLRequestContextGetter are doing. With this, we can test that WebSocket handshake request contains the correct user-agent header value. BUG=347109 Review URL: https://codereview.chromium.org/319083003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275673 0039d316-1c4b-4281-b951-d872f2087c98
Showing
Please register or sign in to comment