- add sources.
[platform/framework/web/crosswalk.git] / src / chrome / test / data / extensions / api_test / proxy / individual_remove / test.js
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
3 // found in the LICENSE file.
4
5 // proxy api test
6 // browser_tests.exe
7 //     --gtest_filter=ProxySettingsApiTest.ProxyFixedIndividualRemove
8
9 var httpProxy = {
10   host: "1.1.1.1"
11 };
12 var httpsProxy = {
13   scheme: "socks5",
14   host: "2.2.2.2"
15 };
16 var ftpProxy = {
17   host: "3.3.3.3",
18   port: 9000
19 };
20 var fallbackProxy = {
21   scheme: "socks4",
22   host: "4.4.4.4",
23   port: 9090
24 };
25
26 var rules = {
27   proxyForHttp: httpProxy,
28   proxyForHttps: httpsProxy,
29   proxyForFtp: ftpProxy,
30   fallbackProxy: fallbackProxy,
31 };
32
33 var config = { rules: rules, mode: "fixed_servers" };
34
35 chrome.test.runTests([
36   // Verify that execution has started to make sure flaky timeouts are not
37   // caused by us.
38   function verifyTestsHaveStarted() {
39     chrome.test.succeed();
40   },
41   function setIndividualProxies() {
42     chrome.proxy.settings.set(
43         {'value': config, 'scope': 'regular'},
44         chrome.test.callbackPass());
45   },
46   function clearProxies() {
47     chrome.proxy.settings.clear(
48         {'scope': 'regular'},
49         chrome.test.callbackPass());
50   }
51 ]);