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

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

Issue 6549015: Extension half of the proxy error event (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/chrome/common/extensions/docs
Patch Set: Created 9 years, 10 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
(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 chrome.test.assertTrue(error.fatal);
10 chrome.test.assertEq("net::ERR_PROXY_CONNECTION_FAILED", error.error);
11 chrome.test.assertEq("", error.details);
12 chrome.test.notifyPass();
13 });
14
15 var rules = {
16 singleProxy: { host: "does.not.exist" }
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://127.0.0.1/", true);
24 req.onload = function () { chrome.test.notifyFail(); }
25 req.send(null);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698