| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 // This test reflectively enumerates all the methods in the system and tries to | 5 // This test reflectively enumerates all the methods in the system and tries to |
| 6 // invoke them will all nulls. This may result in Dart exceptions or hangs, but | 6 // invoke them will all nulls. This may result in Dart exceptions or hangs, but |
| 7 // should never result in crashes or JavaScript exceptions. | 7 // should never result in crashes or JavaScript exceptions. |
| 8 | 8 |
| 9 library test.invoke_natives; | 9 library test.invoke_natives; |
| 10 | 10 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 | 33 |
| 34 // These either cause the VM to segfault or throw uncatchable API errors. | 34 // These either cause the VM to segfault or throw uncatchable API errors. |
| 35 // TODO(15274): Fix them and remove from blacklist. | 35 // TODO(15274): Fix them and remove from blacklist. |
| 36 'dart.io._IOService.dispatch', | 36 'dart.io._IOService.dispatch', |
| 37 new RegExp(r'.*_RandomAccessFile.*'), | 37 new RegExp(r'.*_RandomAccessFile.*'), |
| 38 'dart.io._StdIOUtils._socketType', | 38 'dart.io._StdIOUtils._socketType', |
| 39 'dart.io._StdIOUtils._getStdioOutputStream', | 39 'dart.io._StdIOUtils._getStdioOutputStream', |
| 40 'dart.io._Filter.newZLibInflateFilter', | 40 'dart.io._Filter.newZLibInflateFilter', |
| 41 'dart.io._Filter.newZLibDeflateFilter', | 41 'dart.io._Filter.newZLibDeflateFilter', |
| 42 'dart.io._FileSystemWatcher._listenOnSocket', | 42 'dart.io._FileSystemWatcher._listenOnSocket', |
| 43 'dart.io.SystemEncoding.decode', |
| 44 'dart.io.SystemEncoding.encode', |
| 43 ]; | 45 ]; |
| 44 | 46 |
| 45 bool isBlacklisted(Symbol qualifiedSymbol) { | 47 bool isBlacklisted(Symbol qualifiedSymbol) { |
| 46 var qualifiedString = MirrorSystem.getName(qualifiedSymbol); | 48 var qualifiedString = MirrorSystem.getName(qualifiedSymbol); |
| 47 for (var pattern in blacklist) { | 49 for (var pattern in blacklist) { |
| 48 if (qualifiedString.contains(pattern)) return true; | 50 if (qualifiedString.contains(pattern)) return true; |
| 49 } | 51 } |
| 50 return false; | 52 return false; |
| 51 } | 53 } |
| 52 | 54 |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 0, 0xEFFFFFF, 0xFFFFFFFF, 0xFFFFFFFFFFFFFFFF, | 155 0, 0xEFFFFFF, 0xFFFFFFFF, 0xFFFFFFFFFFFFFFFF, |
| 154 "foo", 'blåbærgrød', 'Îñţérñåţîöñåļîžåţîờñ']; | 156 "foo", 'blåbærgrød', 'Îñţérñåţîöñåļîžåţîờñ']; |
| 155 valueObjects.forEach((v) => checkInstance(reflect(v), 'value object')); | 157 valueObjects.forEach((v) => checkInstance(reflect(v), 'value object')); |
| 156 | 158 |
| 157 uncaughtErrorHandler(self, parent, zone, error, stack) {}; | 159 uncaughtErrorHandler(self, parent, zone, error, stack) {}; |
| 158 var zoneSpec = | 160 var zoneSpec = |
| 159 new ZoneSpecification(handleUncaughtError: uncaughtErrorHandler); | 161 new ZoneSpecification(handleUncaughtError: uncaughtErrorHandler); |
| 160 testZone = Zone.current.fork(specification: zoneSpec); | 162 testZone = Zone.current.fork(specification: zoneSpec); |
| 161 testZone.createTimer(Duration.ZERO, doOneTask); | 163 testZone.createTimer(Duration.ZERO, doOneTask); |
| 162 } | 164 } |
| OLD | NEW |