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

Unified Diff: net/data/proxy_resolver_v8_unittest/bindings.js

Issue 992733002: Remove //net (except for Android test stuff) and sdch (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: net/data/proxy_resolver_v8_unittest/bindings.js
diff --git a/net/data/proxy_resolver_v8_unittest/bindings.js b/net/data/proxy_resolver_v8_unittest/bindings.js
deleted file mode 100644
index 7cf9f2634653885e77709fcd3437f3667f4388b4..0000000000000000000000000000000000000000
--- a/net/data/proxy_resolver_v8_unittest/bindings.js
+++ /dev/null
@@ -1,62 +0,0 @@
-// Try calling the browser-side bound functions with varying (invalid)
-// inputs. There is no notion of "success" for this test, other than
-// verifying the correct C++ bindings were reached with expected values.
-
-function MyObject() {
- this.x = "3";
-}
-
-MyObject.prototype.toString = function() {
- throw "exception from calling toString()";
-}
-
-function expectEquals(expectation, actual) {
- if (!(expectation === actual)) {
- throw "FAIL: expected: " + expectation + ", actual: " + actual;
- }
-}
-
-function FindProxyForURL(url, host) {
- // Call dnsResolve with some wonky arguments.
- // Those expected to fail (because we have passed a non-string parameter)
- // will return |null|, whereas those that have called through to the C++
- // bindings will return '127.0.0.1'.
- expectEquals(null, dnsResolve());
- expectEquals(null, dnsResolve(null));
- expectEquals(null, dnsResolve(undefined));
- expectEquals('127.0.0.1', dnsResolve(""));
- expectEquals(null, dnsResolve({foo: 'bar'}));
- expectEquals(null, dnsResolve(fn));
- expectEquals(null, dnsResolve(['3']));
- expectEquals('127.0.0.1', dnsResolve("arg1", "arg2", "arg3", "arg4"));
-
- // Call alert with some wonky arguments.
- alert();
- alert(null);
- alert(undefined);
- alert({foo:'bar'});
-
- // This should throw an exception when we toString() the argument
- // to alert in the bindings.
- try {
- alert(new MyObject());
- } catch (e) {
- alert(e);
- }
-
- // Call myIpAddress() with wonky arguments
- myIpAddress(null);
- myIpAddress(null, null);
-
- // Call myIpAddressEx() correctly (no arguments).
- myIpAddressEx();
-
- // Call dnsResolveEx() (note that isResolvableEx() implicity calls it.)
- isResolvableEx("is_resolvable");
- dnsResolveEx("foobar");
-
- return "DIRECT";
-}
-
-function fn() {}
-
« no previous file with comments | « net/data/proxy_resolver_v8_unittest/binding_from_global.js ('k') | net/data/proxy_resolver_v8_unittest/direct.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698