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

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

Issue 6312088: Fix handling of setting a single proxy in Proxy Settings API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
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.ProxyFixedSingle 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",
12 host: "127.0.0.1", 11 host: "127.0.0.1",
13 port: 100 12 port: 100
14 }; 13 };
15 14
16 // Single proxy should override HTTP proxy.
17 var httpProxy = {
18 host: "8.8.8.8"
19 };
20
21 // Single proxy should not override SOCKS proxy.
22 var socksProxy = {
23 host: "9.9.9.9"
24 };
25
26 var rules = { 15 var rules = {
27 singleProxy: oneProxy, 16 singleProxy: oneProxy
28 proxyForHttp: httpProxy,
29 socksProxy: socksProxy,
30 }; 17 };
31 18
32 var config = { rules: rules, mode: "fixed_servers" }; 19 var config = { rules: rules, mode: "fixed_servers" };
33 chrome.experimental.proxy.useCustomProxySettings(config); 20 chrome.experimental.proxy.useCustomProxySettings(config);
34 chrome.test.succeed(); 21 chrome.test.succeed();
35 } 22 }
36 ]); 23 ]);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698