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

Unified Diff: pkg/barback/test/package_graph/errors_test.dart

Issue 298133006: Handle synchronous asset load errors in barback. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 7 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
« no previous file with comments | « pkg/barback/lib/src/graph/asset_cascade.dart ('k') | pkg/barback/test/utils.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/barback/test/package_graph/errors_test.dart
diff --git a/pkg/barback/test/package_graph/errors_test.dart b/pkg/barback/test/package_graph/errors_test.dart
index 02a7675d47d9d95e0ada223405bae4fae4e43ce2..1b578a57aca333d19414fc85c659f420765d8444 100644
--- a/pkg/barback/test/package_graph/errors_test.dart
+++ b/pkg/barback/test/package_graph/errors_test.dart
@@ -145,6 +145,22 @@ main() {
]);
});
+ test("a synchronous error loading an asset removes the asset from the graph",
+ () {
+ initGraph(["app|foo.txt"], {"app": [
+ // Have a dummy transformer so that barback at least tries to load the
+ // asset.
+ [new RewriteTransformer("a", "b")]
+ ]});
+
+ setAssetError("app|foo.txt", async: false);
+ updateSources(["app|foo.txt"]);
+ expectNoAsset("app|foo.txt");
+ buildShouldFail([
+ isAssetLoadException("app|foo.txt", isMockLoadException("app|foo.txt"))
+ ]);
+ });
+
test("an asset isn't passed through a transformer with an error", () {
initGraph(["app|foo.txt"], {"app": [[new BadTransformer([])]]});
« no previous file with comments | « pkg/barback/lib/src/graph/asset_cascade.dart ('k') | pkg/barback/test/utils.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698