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

Unified Diff: test/iron_autogrow_textarea_test.dart

Issue 1418513006: update elements and fix some bugs (Closed) Base URL: git@github.com:dart-lang/polymer_elements.git@master
Patch Set: update pubspec/changelog Created 5 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
Index: test/iron_autogrow_textarea_test.dart
diff --git a/test/iron_autogrow_textarea_test.dart b/test/iron_autogrow_textarea_test.dart
index bcdf30653dd6efec18a4046898ba78c9d5945eec..48173210763da904640800225ead0d47703d1d88 100644
--- a/test/iron_autogrow_textarea_test.dart
+++ b/test/iron_autogrow_textarea_test.dart
@@ -50,6 +50,19 @@ main() async {
expect(finalHeight < initialHeight, isTrue);
});
+ test('an undefined bindValue is the empty string', () {
+ IronAutogrowTextarea autogrow = fixture('basic');
+ var initialHeight = autogrow.offsetHeight;
+
+ autogrow.bindValue = 'batman\nand\nrobin';
+ var finalHeight = autogrow.offsetHeight;
+ expect(finalHeight , greaterThan(initialHeight));
+
+ autogrow.bindValue = null;
+ expect(autogrow.offsetHeight, initialHeight);
+ expect(autogrow.textarea.value, '');
+ });
+
test('textarea selection works', () {
IronAutogrowTextarea autogrow = fixture('basic');
var textarea = autogrow.textarea;

Powered by Google App Engine
This is Rietveld 408576698