OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // proxy api test | 5 // proxy api test |
6 // browser_tests.exe --gtest_filter=ExtensionApiTest.ProxyManualSingle | 6 // browser_tests.exe --gtest_filter=ExtensionApiTest.ProxyFixedSingle |
7 | 7 |
8 chrome.test.runTests([ | 8 chrome.test.runTests([ |
9 function setSingleProxy() { | 9 function setSingleProxy() { |
10 var oneProxy = { | 10 var oneProxy = { |
11 scheme: "http", | 11 scheme: "http", |
12 host: "127.0.0.1", | 12 host: "127.0.0.1", |
13 port: 100 | 13 port: 100 |
14 }; | 14 }; |
15 | 15 |
16 // Single proxy should override HTTP proxy. | 16 // Single proxy should override HTTP proxy. |
17 var httpProxy = { | 17 var httpProxy = { |
18 host: "8.8.8.8" | 18 host: "8.8.8.8" |
19 }; | 19 }; |
20 | 20 |
21 // Single proxy should not override SOCKS proxy. | 21 // Single proxy should not override SOCKS proxy. |
22 var socksProxy = { | 22 var socksProxy = { |
23 host: "9.9.9.9" | 23 host: "9.9.9.9" |
24 }; | 24 }; |
25 | 25 |
26 var rules = { | 26 var rules = { |
27 singleProxy: oneProxy, | 27 singleProxy: oneProxy, |
28 proxyForHttp: httpProxy, | 28 proxyForHttp: httpProxy, |
29 socksProxy: socksProxy, | 29 socksProxy: socksProxy, |
30 }; | 30 }; |
31 | 31 |
32 var config = { rules: rules }; | 32 var config = { rules: rules, mode: "fixed_servers" }; |
33 chrome.experimental.proxy.useCustomProxySettings(config); | 33 chrome.experimental.proxy.useCustomProxySettings(config); |
34 chrome.test.succeed(); | 34 chrome.test.succeed(); |
35 } | 35 } |
36 ]); | 36 ]); |
OLD | NEW |