OLD | NEW |
1 // Try calling the browser-side bound functions with varying (invalid) | 1 // Try calling the browser-side bound functions with varying (invalid) |
2 // inputs. There is no notion of "success" for this test, other than | 2 // inputs. There is no notion of "success" for this test, other than |
3 // verifying the correct C++ bindings were reached with expected values. | 3 // verifying the correct C++ bindings were reached with expected values. |
4 | 4 |
5 function MyObject() { | 5 function MyObject() { |
6 this.x = "3"; | 6 this.x = "3"; |
7 } | 7 } |
8 | 8 |
9 MyObject.prototype.toString = function() { | 9 MyObject.prototype.toString = function() { |
10 throw "exception from calling toString()"; | 10 throw "exception from calling toString()"; |
(...skipping 17 matching lines...) Expand all Loading... |
28 alert({foo:'bar'}); | 28 alert({foo:'bar'}); |
29 | 29 |
30 // This should throw an exception when we toString() the argument | 30 // This should throw an exception when we toString() the argument |
31 // to alert in the bindings. | 31 // to alert in the bindings. |
32 try { | 32 try { |
33 alert(new MyObject()); | 33 alert(new MyObject()); |
34 } catch (e) { | 34 } catch (e) { |
35 alert(e); | 35 alert(e); |
36 } | 36 } |
37 | 37 |
38 // Call myIpAddress() with wonky arguments | 38 // Call myIpAddress() with wonky arguments |
39 myIpAddress(null); | 39 myIpAddress(null); |
40 myIpAddress(null, null); | 40 myIpAddress(null, null); |
41 | 41 |
| 42 // Call myIpAddressEx() correctly (no arguments). |
| 43 myIpAddressEx(); |
| 44 |
| 45 // Call dnsResolveEx() (note that isResolvableEx() implicity calls it.) |
| 46 isResolvableEx("is_resolvable"); |
| 47 dnsResolveEx("foobar"); |
| 48 |
42 return "DIRECT"; | 49 return "DIRECT"; |
43 } | 50 } |
44 | 51 |
45 function fn() {} | 52 function fn() {} |
46 | 53 |
OLD | NEW |