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

Unified Diff: lib/src/iron-list/test/physical-count.html

Issue 1418513006: update elements and fix some bugs (Closed) Base URL: git@github.com:dart-lang/polymer_elements.git@master
Patch Set: code review updates 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
« no previous file with comments | « lib/src/iron-list/test/mutations.html ('k') | lib/src/iron-list/test/smoke/avg-worst-case.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/iron-list/test/physical-count.html
diff --git a/lib/src/iron-list/test/physical-count.html b/lib/src/iron-list/test/physical-count.html
index a9f7c2870e5e431923c578c3226eff4c21ef771f..11bcaa9262300fd02b50877b7f282ebbbbef716d 100644
--- a/lib/src/iron-list/test/physical-count.html
+++ b/lib/src/iron-list/test/physical-count.html
@@ -28,7 +28,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
<test-fixture id="trivialList">
<template>
- <x-list item-height="1" list-height="40"></x-list>
+ <x-list item-height="2" list-height="300"></x-list>
</template>
</test-fixture>
@@ -44,12 +44,13 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
test('increase pool size', function(done) {
list.items = buildDataSet(1000);
+
flush(function() {
var lastItem = getLastItemFromList(list);
var lastItemHeight = lastItem.offsetHeight;
var expectedFinalItem = list.offsetHeight/lastItemHeight;
- assert.equal(lastItemHeight, 1);
+ assert.equal(lastItemHeight, 2);
assert.equal(getLastItemFromList(list).textContent, expectedFinalItem);
done();
});
@@ -57,19 +58,19 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
test('increase pool size on resize', function(done) {
list.items = buildDataSet(1000);
-
+
flush(function() {
// change the height of the list
container.listHeight = 500;
// resize
- list.fire('resize');
+ list.fire('iron-resize');
flush(function() {
var lastItem = getLastItemFromList(list);
var lastItemHeight = lastItem.offsetHeight;
- var expectedFinalItem = list.offsetHeight/lastItemHeight - 1;
-
- assert.equal(lastItemHeight, 1);
+ var expectedFinalItem = list.offsetHeight/lastItemHeight;
+
+ assert.equal(lastItemHeight, 2);
assert.equal(getLastItemFromList(list).textContent, expectedFinalItem);
done();
});
« no previous file with comments | « lib/src/iron-list/test/mutations.html ('k') | lib/src/iron-list/test/smoke/avg-worst-case.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698