OLD | NEW |
---|---|
(Empty) | |
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 --gtest_filter=ExtensionApiTest.ProxyEvents | |
7 | |
8 chrome.experimental.proxy.onProxyError.addListener(function (error) { | |
9 if (error.fatal && error.details == "") | |
Matt Perry
2011/02/18 19:51:49
use:
chrome.test.assertTrue(error.fatal)
chrom
jochen (gone - plz use gerrit)
2011/02/21 14:52:59
Done.
| |
10 chrome.test.notifyPass(); | |
11 else | |
12 chrome.test.notifyFail(); | |
13 }); | |
14 | |
15 var rules = { | |
16 singleProxy: { host: "1.1.1.1" } | |
17 }; | |
18 | |
19 var config = { rules: rules, mode: "fixed_servers" }; | |
20 chrome.experimental.proxy.useCustomProxySettings(config); | |
21 | |
22 var req = new XMLHttpRequest(); | |
23 req.open("GET", "http://localhost/", true); | |
24 req.onload = function () { chrome.test.notifyFail(); } | |
25 req.send(null); | |
OLD | NEW |