(browser string, caps Capabilities)
| 1810 | } |
| 1811 | |
| 1812 | func allowProxyForLocalhost(browser string, caps Capabilities) { |
| 1813 | switch browser { |
| 1814 | case "firefox": |
| 1815 | // By default, Firefox explicitly does not use a proxy for connection to |
| 1816 | // localhost and 127.0.0.1. Clear this preference to reach our test proxy. |
| 1817 | ff := caps[firefox.CapabilitiesKey].(firefox.Capabilities) |
| 1818 | if ff.Prefs == nil { |
| 1819 | ff.Prefs = make(map[string]interface{}) |
| 1820 | } |
| 1821 | ff.Prefs["network.proxy.no_proxies_on"] = "" |
| 1822 | ff.Prefs["network.proxy.allow_hijacking_localhost"] = true |
| 1823 | caps.AddFirefox(ff) |
| 1824 | |
| 1825 | case "chrome": |
| 1826 | ch := caps[chrome.CapabilitiesKey].(chrome.Capabilities) |
| 1827 | // Allow Chrome to use the specified proxy for localhost, which is |
| 1828 | // needed for the Proxy test. https://crbug.com/899126 |
| 1829 | ch.Args = append(ch.Args, "--proxy-bypass-list=<-loopback>") |
| 1830 | caps.AddChrome(ch) |
| 1831 | } |
| 1832 | } |
| 1833 | |
| 1834 | func testSwitchFrame(t *testing.T, c config) { |
| 1835 | wd := newRemote(t, c) |
no test coverage detected
searching dependent graphs…