| Index: chrome/test/data/extensions/api_test/proxy/individual/test.js
|
| diff --git a/chrome/test/data/extensions/api_test/proxy/individual/test.js b/chrome/test/data/extensions/api_test/proxy/individual/test.js
|
| index ca675b5e5de6be6ef678008f67a4c4c605f96817..c776405b0daaf4b35062a067ba046a785439f375 100644
|
| --- a/chrome/test/data/extensions/api_test/proxy/individual/test.js
|
| +++ b/chrome/test/data/extensions/api_test/proxy/individual/test.js
|
| @@ -5,23 +5,45 @@
|
| // proxy api test
|
| // browser_tests.exe --gtest_filter=ExtensionApiTest.ProxyFixedIndividual
|
|
|
| +function expect(expected, message) {
|
| + return chrome.test.callbackPass(function(value) {
|
| + chrome.test.assertEq(expected, value, message);
|
| + });
|
| +}
|
| +
|
| chrome.test.runTests([
|
| function setIndividualProxies() {
|
| var httpProxy = {
|
| host: "1.1.1.1"
|
| };
|
| + var httpProxyExpected = {
|
| + scheme: "http",
|
| + host: "1.1.1.1",
|
| + port: 80
|
| + };
|
| var httpsProxy = {
|
| host: "2.2.2.2"
|
| };
|
| + var httpsProxyExpected = {
|
| + scheme: "http",
|
| + host: "2.2.2.2",
|
| + port: 80
|
| + };
|
| var ftpProxy = {
|
| host: "3.3.3.3",
|
| port: 9000
|
| };
|
| + var ftpProxyExpected = {
|
| + scheme: "http", // this is added.
|
| + host: "3.3.3.3",
|
| + port: 9000
|
| + };
|
| var socksProxy = {
|
| scheme: "socks4",
|
| host: "4.4.4.4",
|
| port: 9090
|
| };
|
| + var socksProxyExpected = socksProxy;
|
|
|
| var rules = {
|
| proxyForHttp: httpProxy,
|
| @@ -29,9 +51,22 @@ chrome.test.runTests([
|
| proxyForFtp: ftpProxy,
|
| socksProxy: socksProxy,
|
| };
|
| + var rulesExpected = {
|
| + proxyForHttp: httpProxyExpected,
|
| + proxyForHttps: httpsProxyExpected,
|
| + proxyForFtp: ftpProxyExpected,
|
| + socksProxy: socksProxyExpected,
|
| + };
|
|
|
| var config = { rules: rules, mode: "fixed_servers" };
|
| + var configExpected = { rules: rulesExpected, mode: "fixed_servers" };
|
| +
|
| chrome.experimental.proxy.useCustomProxySettings(config);
|
| - chrome.test.succeed();
|
| + chrome.experimental.proxy.getCurrentProxySettings(
|
| + false,
|
| + expect(configExpected, "invalid proxy settings"));
|
| + chrome.experimental.proxy.getCurrentProxySettings(
|
| + true,
|
| + expect(configExpected, "invalid proxy settings"));
|
| }
|
| ]);
|
|
|