anchor.diff:  
     var testFutures = [];
     testFutures.add(client.getUrl(Uri.parse('https://$HOST_NAME:$port/$result'))
  -    .then((HttpClientRequest request) { expect(false); },
  -        onError: (e) { expect(e is HandshakeException); }));
  +    .then((HttpClientRequest request) {
  +      expect(false);
  +    }, onError: (e) {
  +      expect(e is HandshakeException || e is SocketException);
  +    }));
   
     client.badCertificateCallback = badCertificateCallback;
     testFutures.add( client.getUrl(Uri.parse('https://$HOST_NAME:$port/$result'))
  
positive.code:     .then((HttpClientRequest request) {
        expect(false);
      }, onError: (e) {
        expect(e is HandshakeException);
      }));
  
    return Future.wait(testFutures);
  
negative.code:       expect(result == 'true');
        request.close().then((result) { });
      }, onError: (e) {
        if (result == 'false') expect (e is HandshakeException ||
                                       e is SocketException);
        else if (result == 'exception') expect (e is ExpectException ||
                                                e is SocketException);
        else expect (e is ArgumentError || e is SocketException);
      }));
  
    client.badCertificateCallback = null;
  