Index: lib/src/iron-autogrow-textarea/test/basic.html |
diff --git a/lib/src/iron-autogrow-textarea/test/basic.html b/lib/src/iron-autogrow-textarea/test/basic.html |
index 4ab7c36e6b2679471b907c97c91712772aa8a71e..896c2c47b1a875260eb0d3bc115eeebfbef68d52 100644 |
--- a/lib/src/iron-autogrow-textarea/test/basic.html |
+++ b/lib/src/iron-autogrow-textarea/test/basic.html |
@@ -88,6 +88,19 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN |
assert.isTrue(finalHeight < initialHeight); |
}); |
+ test('an undefined bindValue is the empty string', function() { |
+ var autogrow = fixture('basic'); |
+ var initialHeight = autogrow.offsetHeight; |
+ |
+ autogrow.bindValue = 'batman\nand\nrobin'; |
+ var finalHeight = autogrow.offsetHeight; |
+ assert.isTrue(finalHeight > initialHeight); |
+ |
+ autogrow.bindValue = undefined; |
+ assert.equal(autogrow.offsetHeight, initialHeight); |
+ assert.equal(autogrow.textarea.value, ''); |
+ }); |
+ |
test('textarea selection works', function() { |
var autogrow = fixture('basic'); |
var textarea = autogrow.textarea; |