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

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

Issue 37813002: Don't return outputs from a removed PhaseInput. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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/phase_input.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/barback/test/package_graph/transform_test.dart
diff --git a/pkg/barback/test/package_graph/transform_test.dart b/pkg/barback/test/package_graph/transform_test.dart
index 14aff9fabcf1a105b5433590b35af02a742ec347..ae097a6f4f6e789b8a9aea0b0237080417e63fb2 100644
--- a/pkg/barback/test/package_graph/transform_test.dart
+++ b/pkg/barback/test/package_graph/transform_test.dart
@@ -806,6 +806,30 @@ main() {
buildShouldSucceed();
});
+ test("one transformer takes a long time while the other finishes, then "
+ "the input is removed", () {
+ var rewrite1 = new RewriteTransformer("txt", "out1");
+ var rewrite2 = new RewriteTransformer("txt", "out2");
+ initGraph(["app|foo.txt"], {"app": [[rewrite1, rewrite2]]});
+
+ rewrite1.pauseApply();
+
+ updateSources(["app|foo.txt"]);
+
+ // Wait for rewrite1 to pause and rewrite2 to finish.
+ schedule(pumpEventQueue);
+
+ removeSources(["app|foo.txt"]);
+
+ // Make sure the removal is processed completely before we restart rewrite2.
+ schedule(pumpEventQueue);
+ rewrite1.resumeApply();
+
+ buildShouldSucceed();
+ expectNoAsset("app|foo.out1");
+ expectNoAsset("app|foo.out2");
+ });
+
group("pass-through", () {
test("passes an asset through a phase in which no transforms apply", () {
initGraph([
« no previous file with comments | « pkg/barback/lib/src/phase_input.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698