Add regression test for previously fixed bug.
Closes #388.
R=alanknight@google.com
Review URL: https://chromiumcodereview.appspot.com//1257793003 .
diff --git a/lib/src/chunk_builder.dart b/lib/src/chunk_builder.dart
index 25d36cb..c7ff91b 100644
--- a/lib/src/chunk_builder.dart
+++ b/lib/src/chunk_builder.dart
@@ -511,13 +511,6 @@
// If there is a hard newline within the block, force the surrounding rule
// for it so that we apply that constraint.
- // TODO(rnystrom): This does the wrong thing when there is are multiple
- // block arguments. We correctly force the rule, but then it gets popped
- // off the writer's stack and it forgets it was forced. Can repro with:
- //
- // longFunctionName(
- // [longElementName, longElementName, longElementName],
- // [short]);
if (forceSplit) _parent.forceRules();
// Write the split for the block contents themselves.
diff --git a/test/regression/0300/0388.unit b/test/regression/0300/0388.unit
new file mode 100644
index 0000000..a42d366
--- /dev/null
+++ b/test/regression/0300/0388.unit
@@ -0,0 +1,41 @@
+>>>
+class _SimpleNodeValidator {
+ factory _SimpleNodeValidator.allowImages(UriPolicy uriPolicy) {
+ return new _SimpleNodeValidator(uriPolicy,
+ allowedElements: const ['IMG'],
+ allowedAttributes: const [
+ 'IMG::align',
+ 'IMG::alt',
+ 'IMG::border',
+ 'IMG::height',
+ 'IMG::hspace',
+ 'IMG::ismap',
+ 'IMG::name',
+ 'IMG::usemap',
+ 'IMG::vspace',
+ 'IMG::width',
+ ],
+ allowedUriAttributes: const ['IMG::src',]);
+ }
+}
+<<<
+class _SimpleNodeValidator {
+ factory _SimpleNodeValidator.allowImages(UriPolicy uriPolicy) {
+ return new _SimpleNodeValidator(uriPolicy, allowedElements: const [
+ 'IMG'
+ ], allowedAttributes: const [
+ 'IMG::align',
+ 'IMG::alt',
+ 'IMG::border',
+ 'IMG::height',
+ 'IMG::hspace',
+ 'IMG::ismap',
+ 'IMG::name',
+ 'IMG::usemap',
+ 'IMG::vspace',
+ 'IMG::width',
+ ], allowedUriAttributes: const [
+ 'IMG::src',
+ ]);
+ }
+}
\ No newline at end of file