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

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

Issue 6469030: Support bypassList in Proxy Settings API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments 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/bypass/test.html ('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/bypass/test.js
diff --git a/chrome/test/data/extensions/api_test/proxy/bypass/test.js b/chrome/test/data/extensions/api_test/proxy/bypass/test.js
new file mode 100644
index 0000000000000000000000000000000000000000..36c58729bfbc807f7efa2241cc38cabed26b7e70
--- /dev/null
+++ b/chrome/test/data/extensions/api_test/proxy/bypass/test.js
@@ -0,0 +1,45 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// proxy api test
+// browser_tests.exe --gtest_filter=ExtensionApiTest.ProxyBypass
+
+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 rules = {
+ proxyForHttp: httpProxy,
+ bypassList: ["localhost", "::1", "foo.bar", "<local>"]
+ };
+ var rulesExpected = {
+ proxyForHttp: httpProxyExpected,
+ bypassList: ["localhost", "::1", "foo.bar", "<local>"]
+ };
+
+ var config = { rules: rules, mode: "fixed_servers" };
+ var configExpected = { rules: rulesExpected, mode: "fixed_servers" };
+
+ chrome.experimental.proxy.useCustomProxySettings(config);
+ 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/bypass/test.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698