WPT private instance with Proxy server

Hi,

I have proxy server configuered on my web page private instance agent, and for some reason chrome and firefox are having problem with it (IE8 works fine.), is there any special config that needs to be done on the wptdriver ?

Thanks,
Yaron.

For chrome you should go into wptdriver.ini and remove the command-line option that disables proxying (maybe even specify the proxy server explicitly).

For firefox you will need to go into the templates\firefox directory and edit the prefs file which has the default preferences we use for Firefox and configure the proxy settings there.

What is the correct way to setup Chrome to use a proxy server (for http and https connections)?

I’m trying to setup wpt (2.15) to use a web proxy and get this error using Chrome.

“The following error was encountered while trying to retrieve the URL: http://127.0.0.1:8888/blank2.html
Connection to 127.0.0.1 failed.
The system returned: (111) Connection refused”

Toggling the “bypass proxy for local connections” doesnt make any difference.

For Chrome:
[Chrome]
exe=“C:\Program Files (x86)\Google\Chrome\Application\chrome.exe”
options=‘–load-extension=“%WPTDIR%\extension” --user-data-dir=“%PROFILE%” --proxy-server=x.x.x.x:y’

For Firefox:
With the same proxy for firefox in the prefs file (as mentioned below) it works fine.
user_pref(“network.proxy.http”, “x.x.x.x”);
user_pref(“network.proxy.http_port”, y);
user_pref(“network.proxy.ssl”, “x.x.x.x”);
user_pref(“network.proxy.ssl_port”, y);
user_pref(“network.proxy.type”, 1);

You may need to use a proxy PAC file --proxy-pac-url=file:///path/to/config.pac and write one that goes DIRECT for 127.0.0.1 hosts.

Here’s an example:

function FindProxyForURL(url, host) {
  if ((host == "localhost") ||
      (shExpMatch(host, "localhost.*")) ||
      (host == "127.0.0.1")) {
    return "DIRECT";
  }

  return "HTTP proxy.example.com";
}

@ Patrick, this suggestion is not clear, you want us to write a piece of code outside the ini file to handle this proxy issue for chrome, was it still required to be done manually or its handled from wpt side internally now with latest wpt and agent, we are still having tough time with Chrome alone running test in custom mode in our private instance, please help.