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

Side by Side Diff: chrome/test/data/extensions/api_test/proxy/individual/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.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);
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 var config = { rules: rules, mode: "fixed_servers" }; 59 var config = { rules: rules, mode: "fixed_servers" };
60 var configExpected = { rules: rulesExpected, mode: "fixed_servers" }; 60 var configExpected = { rules: rulesExpected, mode: "fixed_servers" };
61 61
62 chrome.test.runTests([ 62 chrome.test.runTests([
63 // Verify that execution has started to make sure flaky timeouts are not 63 // Verify that execution has started to make sure flaky timeouts are not
64 // caused by us. 64 // caused by us.
65 function verifyTestsHaveStarted() { 65 function verifyTestsHaveStarted() {
66 chrome.test.succeed(); 66 chrome.test.succeed();
67 }, 67 },
68 function setIndividualProxies() { 68 function setIndividualProxies() {
69 chrome.experimental.proxy.settings.set( 69 chrome.proxy.settings.set(
70 {'value': config}, 70 {'value': config},
71 chrome.test.callbackPass()); 71 chrome.test.callbackPass());
72 }, 72 },
73 function verifyRegular() { 73 function verifyRegular() {
74 chrome.experimental.proxy.settings.get( 74 chrome.proxy.settings.get(
75 {'incognito': false}, 75 {'incognito': false},
76 expect({ 'value': configExpected, 76 expect({ 'value': configExpected,
77 'levelOfControl': "ControlledByThisExtension" }, 77 'levelOfControl': "ControlledByThisExtension" },
78 "invalid proxy settings")); 78 "invalid proxy settings"));
79 }, 79 },
80 function verifyIncognito() { 80 function verifyIncognito() {
81 chrome.experimental.proxy.settings.get( 81 chrome.proxy.settings.get(
82 {'incognito': true}, 82 {'incognito': true},
83 expect({ 'value': configExpected, 83 expect({ 'value': configExpected,
84 'incognitoSpecific': false, 84 'incognitoSpecific': false,
85 'levelOfControl': "ControlledByThisExtension" }, 85 'levelOfControl': "ControlledByThisExtension" },
86 "invalid proxy settings")); 86 "invalid proxy settings"));
87 } 87 }
88 ]); 88 ]);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698