| 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.ProxyBypass | 6 // browser_tests.exe --gtest_filter=ProxySettingsApiTest.ProxyBypass |
| 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); |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 }, | 40 }, |
| 41 function setIndividualProxies() { | 41 function setIndividualProxies() { |
| 42 chrome.proxy.settings.set( | 42 chrome.proxy.settings.set( |
| 43 {'value': config}, | 43 {'value': config}, |
| 44 chrome.test.callbackPass()); | 44 chrome.test.callbackPass()); |
| 45 }, | 45 }, |
| 46 function verifyRegular() { | 46 function verifyRegular() { |
| 47 chrome.proxy.settings.get( | 47 chrome.proxy.settings.get( |
| 48 {'incognito': false}, | 48 {'incognito': false}, |
| 49 expect({ 'value': configExpected, | 49 expect({ 'value': configExpected, |
| 50 'levelOfControl': "ControlledByThisExtension" }, | 50 'levelOfControl': "controlled_by_this_extension" }, |
| 51 "invalid proxy settings")); | 51 "invalid proxy settings")); |
| 52 }, | 52 }, |
| 53 function verifyIncognito() { | 53 function verifyIncognito() { |
| 54 chrome.proxy.settings.get( | 54 chrome.proxy.settings.get( |
| 55 {'incognito': true}, | 55 {'incognito': true}, |
| 56 expect({ 'value': configExpected, | 56 expect({ 'value': configExpected, |
| 57 'incognitoSpecific': false, | 57 'incognitoSpecific': false, |
| 58 'levelOfControl': "ControlledByThisExtension" }, | 58 'levelOfControl': "controlled_by_this_extension" }, |
| 59 "invalid proxy settings")); | 59 "invalid proxy settings")); |
| 60 } | 60 } |
| 61 ]); | 61 ]); |
| OLD | NEW |