-
Notifications
You must be signed in to change notification settings - Fork 129
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #40 from PolymerElements/display-none
Fix #39
- Loading branch information
Showing
9 changed files
with
239 additions
and
123 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
<!doctype html> | ||
<!-- | ||
@license | ||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved. | ||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE | ||
The complete set of authors may be found at http://polymer.github.io/AUTHORS | ||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS | ||
Code distributed by Google as part of the polymer project is also | ||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS | ||
--> | ||
<html> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>iron-list test</title> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"> | ||
|
||
<script src="../../webcomponentsjs/webcomponents-lite.js"></script> | ||
<script src="../../web-component-tester/browser.js"></script> | ||
<script src="../../test-fixture/test-fixture-mocha.js"></script> | ||
|
||
<link rel="import" href="../../test-fixture/test-fixture.html"> | ||
<link rel="import" href="../../paper-styles/paper-styles.html"> | ||
<link rel="import" href="helpers.html"> | ||
<link rel="import" href="x-list.html"> | ||
|
||
</head> | ||
<body> | ||
|
||
<test-fixture id="trivialList"> | ||
<template> | ||
<x-list hidden></x-list> | ||
</template> | ||
</test-fixture> | ||
|
||
<script> | ||
|
||
suite('hidden list', function() { | ||
var list, container; | ||
|
||
setup(function() { | ||
container = fixture('trivialList'); | ||
list = container.list; | ||
}); | ||
|
||
test('list size', function(done) { | ||
list.items = buildDataSet(100); | ||
flush(function() { | ||
assert.equal(list.offsetWidth, 0); | ||
assert.equal(list.offsetHeight, 0); | ||
done(); | ||
}); | ||
}); | ||
|
||
test('resize', function(done) { | ||
list.items = buildDataSet(100); | ||
list.fire('resize'); | ||
flush(function() { | ||
assert.notEqual(getFirstItemFromList(list).textContent, '0'); | ||
|
||
container.removeAttribute('hidden'); | ||
|
||
flush(function() { | ||
assert.notEqual(getFirstItemFromList(list).textContent, '0'); | ||
|
||
list.fire('resize'); | ||
|
||
flush(function() { | ||
assert.equal(getFirstItemFromList(list).textContent, '0'); | ||
done(); | ||
}); | ||
}); | ||
}); | ||
}); | ||
|
||
}); | ||
|
||
</script> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.