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

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

Issue 6541021: Send fatal proxy errors to the network delegate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates 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 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);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698