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

Side by Side Diff: chrome/test/data/extensions/api_test/proxy/single/test.js

Issue 6004003: Introduce a separate preference for 'proxy server mode' (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nit - alphabetize Created 10 years 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
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 ]);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698