| Index: third_party/pkg/angular/test/core_dom/http_spec.dart
|
| diff --git a/third_party/pkg/angular/test/core_dom/http_spec.dart b/third_party/pkg/angular/test/core_dom/http_spec.dart
|
| index dc29c0df93f3c5da108cdd90c04c235168294a87..7812d5d37017537a84e4c6f7b3e2182054bfada7 100644
|
| --- a/third_party/pkg/angular/test/core_dom/http_spec.dart
|
| +++ b/third_party/pkg/angular/test/core_dom/http_spec.dart
|
| @@ -1259,6 +1259,24 @@ main() => describe('http', () {
|
| }));
|
|
|
|
|
| + it('should call onError on a JSON parse error', async(() {
|
| + backend.expect('GET', '/url').respond('[x]');
|
| + var callbackCalled = false;
|
| + var onErrorCalled = false;
|
| + http.get('/url').then((_) {
|
| + callbackCalled = true;
|
| + }, onError: (e,s) {
|
| + // Dartium throws "Unexpected character"
|
| + // dart2js throws "Unexpected token"
|
| + expect('$e').toContain('Unexpected');
|
| + onErrorCalled = true;
|
| + });
|
| + flush();
|
| + expect(callbackCalled).toBeFalsy();
|
| + expect(onErrorCalled).toBeTruthy();
|
| + }));
|
| +
|
| +
|
| it('should not deserialize tpl beginning with ng expression', async(() {
|
| backend.expect('GET', '/url').respond('{{some}}');
|
| http.get('/url').then(callback);
|
|
|