Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(76)

Unified Diff: chrome/test/data/extensions/api_test/proxy/individual/test.js

Issue 6468002: Implementation of getCurrentProxySettings for proxy settings API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/out/Debug
Patch Set: Removed todo and ask mpcomplete now. Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/test/data/extensions/api_test/proxy/direct/test.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"));
}
]);
« no previous file with comments | « chrome/test/data/extensions/api_test/proxy/direct/test.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698