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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // proxy api test
6 // browser_tests.exe --gtest_filter=ExtensionApiTest.ProxyBypass
7
8 function expect(expected, message) {
9 return chrome.test.callbackPass(function(value) {
10 chrome.test.assertEq(expected, value, message);
11 });
12 }
13
14 chrome.test.runTests([
15 function setIndividualProxies() {
16 var httpProxy = {
17 host: "1.1.1.1"
18 };
19 var httpProxyExpected = {
20 scheme: "http",
21 host: "1.1.1.1",
22 port: 80
23 };
24
25 var rules = {
26 proxyForHttp: httpProxy,
27 bypassList: ["localhost", "::1", "foo.bar"]
28 };
29 var rulesExpected = {
30 proxyForHttp: httpProxyExpected,
31 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
32 };
33
34 var config = { rules: rules, mode: "fixed_servers" };
35 var configExpected = { rules: rulesExpected, mode: "fixed_servers" };
36
37 chrome.experimental.proxy.useCustomProxySettings(config);
38 chrome.experimental.proxy.getCurrentProxySettings(
39 false,
40 expect(configExpected, "invalid proxy settings"));
41 chrome.experimental.proxy.getCurrentProxySettings(
42 true,
43 expect(configExpected, "invalid proxy settings"));
44 }
45 ]);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698