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

Side by Side Diff: pkg/barback/test/package_graph/add_remove_transform_test.dart

Issue 343963003: Fix a barback bug where a closed stream could get an event. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « pkg/barback/pubspec.yaml ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library barback.test.package_graph.transform_test; 5 library barback.test.package_graph.transform_test;
6 6
7 import 'package:barback/src/utils.dart'; 7 import 'package:barback/src/utils.dart';
8 import 'package:scheduled_test/scheduled_test.dart'; 8 import 'package:scheduled_test/scheduled_test.dart';
9 9
10 import '../utils.dart'; 10 import '../utils.dart';
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 buildShouldSucceed(); 353 buildShouldSucceed();
354 354
355 removeSources(["app|foo.txt"]); 355 removeSources(["app|foo.txt"]);
356 expectNoAsset("app|foo.out"); 356 expectNoAsset("app|foo.out");
357 buildShouldSucceed(); 357 buildShouldSucceed();
358 358
359 updateSources(["app|foo.txt"]); 359 updateSources(["app|foo.txt"]);
360 expectAsset("app|foo.out", "foo.mid.out"); 360 expectAsset("app|foo.out", "foo.mid.out");
361 buildShouldSucceed(); 361 buildShouldSucceed();
362 }); 362 });
363
364 // Regression test for issue 19540.
365 solo_test("a phase is removed and then one of its inputs is updated", () {
Bob Nystrom 2014/06/19 21:07:29 Don't solo! :)
nweiz 2014/06/19 21:10:53 I dunno, I think this is probably the only really
366 // Have an empty first phase because the first phase is never removed.
367 initGraph(["app|foo.txt"], {
368 "app": [[], [new RewriteTransformer("txt", "out")]]
369 });
370
371 updateSources(["app|foo.txt"]);
372 expectAsset("app|foo.out", "foo.out");
373 buildShouldSucceed();
374
375 // First empty both phases. This allows the second phase to be considered
376 // idle even when its transformer is no longer running.
377 updateTransformers("app", [[], []]);
378 buildShouldSucceed();
379
380 // Now remove the second phase. It should unsubscribe from its input's
381 // events.
382 updateTransformers("app", [[]]);
383 buildShouldSucceed();
384
385 // Update the input. With issue 19540, this would cause the removed phase to
386 // try to update its status, which would crash.
387 updateSources(["app|foo.txt"]);
388 buildShouldSucceed();
389 });
363 } 390 }
OLDNEW
« no previous file with comments | « pkg/barback/pubspec.yaml ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698