Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(65)

Unified Diff: third_party/pkg/angular/test/core_dom/http_spec.dart

Issue 148453003: Updating Angular version (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);
« no previous file with comments | « third_party/pkg/angular/test/core_dom/directive_spec.dart ('k') | third_party/pkg/angular/test/core_dom/selector_spec.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698