OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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=ProxySettingsApiTest.ProxyFixedSingle | 6 // browser_tests.exe --gtest_filter=ProxySettingsApiTest.ProxyFixedSingle |
7 | 7 |
8 chrome.test.runTests([ | 8 chrome.test.runTests([ |
9 // Verify that execution has started to make sure flaky timeouts are not | 9 // Verify that execution has started to make sure flaky timeouts are not |
10 // caused by us. | 10 // caused by us. |
11 function verifyTestsHaveStarted() { | 11 function verifyTestsHaveStarted() { |
12 chrome.test.succeed(); | 12 chrome.test.succeed(); |
13 }, | 13 }, |
14 function setSingleProxy() { | 14 function setSingleProxy() { |
15 var oneProxy = { | 15 var oneProxy = { |
16 host: "127.0.0.1", | 16 host: "127.0.0.1", |
17 port: 100 | 17 port: 100 |
18 }; | 18 }; |
19 | 19 |
20 var rules = { | 20 var rules = { |
21 singleProxy: oneProxy | 21 singleProxy: oneProxy |
22 }; | 22 }; |
23 | 23 |
24 var config = { rules: rules, mode: "fixed_servers" }; | 24 var config = { rules: rules, mode: "fixed_servers" }; |
25 chrome.experimental.proxy.settings.set( | 25 chrome.proxy.settings.set( |
26 {'value': config}, | 26 {'value': config}, |
27 chrome.test.callbackPass()); | 27 chrome.test.callbackPass()); |
28 } | 28 } |
29 ]); | 29 ]); |
OLD | NEW |