Index: chrome/test/data/extensions/api_test/proxy/events/test.js |
diff --git a/chrome/test/data/extensions/api_test/proxy/events/test.js b/chrome/test/data/extensions/api_test/proxy/events/test.js |
new file mode 100644 |
index 0000000000000000000000000000000000000000..a61d5db9cf4561b419b995579dde2d9c71a141f9 |
--- /dev/null |
+++ b/chrome/test/data/extensions/api_test/proxy/events/test.js |
@@ -0,0 +1,25 @@ |
+// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+// proxy api test |
+// browser_tests.exe --gtest_filter=ExtensionApiTest.ProxyEvents |
+ |
+chrome.experimental.proxy.onProxyError.addListener(function (error) { |
+ 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.
|
+ chrome.test.notifyPass(); |
+ else |
+ chrome.test.notifyFail(); |
+}); |
+ |
+var rules = { |
+ singleProxy: { host: "1.1.1.1" } |
+}; |
+ |
+var config = { rules: rules, mode: "fixed_servers" }; |
+chrome.experimental.proxy.useCustomProxySettings(config); |
+ |
+var req = new XMLHttpRequest(); |
+req.open("GET", "http://localhost/", true); |
+req.onload = function () { chrome.test.notifyFail(); } |
+req.send(null); |