| Index: third_party/pkg/angular/lib/playback/playback_http.dart
|
| ===================================================================
|
| --- third_party/pkg/angular/lib/playback/playback_http.dart (revision 33054)
|
| +++ third_party/pkg/angular/lib/playback/playback_http.dart (working copy)
|
| @@ -13,9 +13,9 @@
|
| @NgInjectableService()
|
| class PlaybackHttpBackendConfig {
|
| requestKey(String url,
|
| - {String method, bool withCredentials, String responseType,
|
| - String mimeType, Map<String, String> requestHeaders, sendData,
|
| - void onProgress(ProgressEvent e)}) {
|
| + {String method, bool withCredentials, String responseType,
|
| + String mimeType, Map<String, String> requestHeaders, sendData,
|
| + void onProgress(ProgressEvent e)}) {
|
| return JSON.encode({
|
| "url": url,
|
| "method": method,
|
| @@ -29,7 +29,7 @@
|
| // the HttpBackend, but it will be implemented by ourselves.
|
| class HttpBackendWrapper {
|
| HttpBackend backend;
|
| - HttpBackendWrapper(this.backend);
|
| + HttpBackendWrapper(HttpBackend this.backend);
|
| }
|
|
|
| class RecordingHttpBackend implements HttpBackend {
|
| @@ -37,8 +37,9 @@
|
| HttpBackend _prodBackend;
|
| PlaybackHttpBackendConfig _config;
|
|
|
| - RecordingHttpBackend(HttpBackendWrapper wrapper, this._config)
|
| - : _prodBackend = wrapper.backend;
|
| + RecordingHttpBackend(HttpBackendWrapper wrapper, this._config) {
|
| + this._prodBackend = wrapper.backend;
|
| + }
|
|
|
| Future request(String url,
|
| {String method, bool withCredentials, String responseType,
|
| @@ -96,7 +97,9 @@
|
| sendData: sendData,
|
| onProgress: onProgress);
|
|
|
| - if (!data.containsKey(key)) throw ["Request is not recorded $key"];
|
| + if (!data.containsKey(key)) {
|
| + throw ["Request is not recorded $key"];
|
| + }
|
| var playback = data[key];
|
| return new Future.value(
|
| new mock.MockHttpRequest(
|
|
|