could you use something like https://github.com/angular/angular.dart/blob/a5d5c2b17a64acadb7935bf734da7e92d3a4cf74/test/core_dom/http_spec.dart#L72

It should be extended to support withCrdentials, ie 
`backend.expect('GET', '/url', withCrdentials: true).respond('');`