| 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.ProxyFixedIndividual | 6 // browser_tests.exe --gtest_filter=ProxySettingsApiTest.ProxyFixedIndividual |
| 7 | 7 |
| 8 function expect(expected, message) { | 8 function expect(expected, message) { |
| 9 return chrome.test.callbackPass(function(value) { | 9 return chrome.test.callbackPass(function(value) { |
| 10 chrome.test.assertEq(expected, value, message); | 10 chrome.test.assertEq(expected, value, message); |
| 11 }); | 11 }); |
| 12 } | 12 } |
| 13 | 13 |
| 14 var httpProxy = { | 14 var httpProxy = { |
| 15 scheme: "quic", |
| 15 host: "1.1.1.1" | 16 host: "1.1.1.1" |
| 16 }; | 17 }; |
| 17 var httpProxyExpected = { | 18 var httpProxyExpected = { |
| 18 scheme: "http", | 19 scheme: "quic", |
| 19 host: "1.1.1.1", | 20 host: "1.1.1.1", |
| 20 port: 80 | 21 port: 443 |
| 21 }; | 22 }; |
| 22 var httpsProxy = { | 23 var httpsProxy = { |
| 23 host: "2.2.2.2" | 24 host: "2.2.2.2" |
| 24 }; | 25 }; |
| 25 var httpsProxyExpected = { | 26 var httpsProxyExpected = { |
| 26 scheme: "http", | 27 scheme: "http", |
| 27 host: "2.2.2.2", | 28 host: "2.2.2.2", |
| 28 port: 80 | 29 port: 80 |
| 29 }; | 30 }; |
| 30 var ftpProxy = { | 31 var ftpProxy = { |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 }, | 80 }, |
| 80 function verifyIncognito() { | 81 function verifyIncognito() { |
| 81 chrome.proxy.settings.get( | 82 chrome.proxy.settings.get( |
| 82 {'incognito': true}, | 83 {'incognito': true}, |
| 83 expect({ 'value': configExpected, | 84 expect({ 'value': configExpected, |
| 84 'incognitoSpecific': false, | 85 'incognitoSpecific': false, |
| 85 'levelOfControl': "controlled_by_this_extension" }, | 86 'levelOfControl': "controlled_by_this_extension" }, |
| 86 "invalid proxy settings")); | 87 "invalid proxy settings")); |
| 87 } | 88 } |
| 88 ]); | 89 ]); |
| OLD | NEW |