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

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

Issue 6992022: Move Proxy Settings API out of experimental (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed remainder of merge conflict. Fixes unit test Created 9 years, 7 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) 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.ProxyAutoSettings 6 // browser_tests.exe --gtest_filter=ProxySettingsApiTest.ProxyAutoSettings
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 config = { 14 var config = {
15 mode: "auto_detect" 15 mode: "auto_detect"
16 }; 16 };
17 17
18 chrome.test.runTests([ 18 chrome.test.runTests([
19 // Verify that execution has started to make sure flaky timeouts are not 19 // Verify that execution has started to make sure flaky timeouts are not
20 // caused by us. 20 // caused by us.
21 function verifyTestsHaveStarted() { 21 function verifyTestsHaveStarted() {
22 chrome.test.succeed(); 22 chrome.test.succeed();
23 }, 23 },
24 function setAutoSettings() { 24 function setAutoSettings() {
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 function verifyRegular() { 29 function verifyRegular() {
30 chrome.experimental.proxy.settings.get( 30 chrome.proxy.settings.get(
31 {'incognito': false}, 31 {'incognito': false},
32 expect({ 'value': config, 32 expect({ 'value': config,
33 'levelOfControl': "ControlledByThisExtension" }, 33 'levelOfControl': "ControlledByThisExtension" },
34 "invalid proxy settings")); 34 "invalid proxy settings"));
35 }, 35 },
36 function verifyIncognito() { 36 function verifyIncognito() {
37 chrome.experimental.proxy.settings.get( 37 chrome.proxy.settings.get(
38 {'incognito': true}, 38 {'incognito': true},
39 expect({ 'value': config, 39 expect({ 'value': config,
40 'incognitoSpecific': false, 40 'incognitoSpecific': false,
41 'levelOfControl': "ControlledByThisExtension" }, 41 'levelOfControl': "ControlledByThisExtension" },
42 "invalid proxy settings")); 42 "invalid proxy settings"));
43 } 43 }
44 ]); 44 ]);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698