| Index: test/iron_list_test_helpers.dart
|
| diff --git a/test/iron_list_test_helpers.dart b/test/iron_list_test_helpers.dart
|
| index 740a374366a7a88817f59c6c0fc2a05cb3f010ed..66b079a6e4147558c607c90d1a18543557c73a63 100644
|
| --- a/test/iron_list_test_helpers.dart
|
| +++ b/test/iron_list_test_helpers.dart
|
| @@ -5,6 +5,7 @@ library polymer_elements.test.iron_list_test_helpers;
|
|
|
| import 'dart:html';
|
| import 'dart:js';
|
| +import 'package:polymer_elements/iron_list.dart';
|
| import 'common.dart';
|
|
|
| JsFunction _matchesSelector = context['Polymer']['DomApi']['matchesSelector'];
|
| @@ -73,3 +74,25 @@ Element getLastItemFromList(list) {
|
| return document.elementFromPoint((listRect.left + 1).floor(),
|
| (listRect.top + listRect.height - 1).floor());
|
| }
|
| +
|
| +isFullOfItems(IronList list) {
|
| + var listRect = list.getBoundingClientRect();
|
| + var listHeight = listRect.height - 1;
|
| + var item, y = listRect.top + 1;
|
| + // IE 10 & 11 doesn't render propertly :(
|
| + var badPixels = 0;
|
| + while (y < listHeight) {
|
| + item = document.elementFromPoint((listRect.left + 1).floor(), y.floor())
|
| + as HtmlElement;
|
| + if (item.parentNode != null &&
|
| + new JsObject.fromBrowserObject(item.parentNode)['_templateInstance'] ==
|
| + null) {
|
| + badPixels++;
|
| + }
|
| + if (badPixels > 3) {
|
| + return false;
|
| + }
|
| + y += 2;
|
| + }
|
| + return true;
|
| +}
|
|
|