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

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: New version fixing unit test 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
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..8eb9a8367dbf79942ff11747fa92cdb0eefb9d4b
--- /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"]
+ };
+ var rulesExpected = {
+ proxyForHttp: httpProxyExpected,
+ bypassList: ["localhost", "::1", "foo.bar"]
eroman 2011/02/11 04:52:28 side note: there are also some "magical" values wh
battre 2011/02/11 15:06:03 I realized this when writing the documentation for
+ };
+
+ 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"));
+ }
+]);

Powered by Google App Engine
This is Rietveld 408576698