update components
This commit is contained in:
parent
8c9287d505
commit
aa272fb404
106 changed files with 1733 additions and 554 deletions
|
@ -20,10 +20,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
<script src="../../webcomponentsjs/webcomponents-lite.js"></script>
|
||||
|
||||
<script src="../../web-component-tester/browser.js"></script>
|
||||
<script src="../../test-fixture/test-fixture-mocha.js"></script>
|
||||
<script src="../../iron-test-helpers/test-helpers.js"></script>
|
||||
|
||||
<link rel="import" href="../../test-fixture/test-fixture.html">
|
||||
<link rel="import" href="test-overlay.html">
|
||||
|
||||
</head>
|
||||
|
@ -287,6 +284,52 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
});
|
||||
});
|
||||
|
||||
suite('z-ordering', function() {
|
||||
|
||||
var overlays;
|
||||
var originalMinimumZ;
|
||||
|
||||
setup(function() {
|
||||
overlays = fixture('multiple');
|
||||
originalMinimumZ = Polymer.IronOverlayManager._minimumZ;
|
||||
});
|
||||
|
||||
teardown(function() {
|
||||
Polymer.IronOverlayManager._minimumZ = originalMinimumZ;
|
||||
});
|
||||
|
||||
// for iframes
|
||||
test('default z-index is greater than 100', function(done) {
|
||||
runAfterOpen(overlays[0], function() {
|
||||
var styleZ = parseInt(window.getComputedStyle(overlays[0]).zIndex, 10);
|
||||
assert.isTrue(styleZ > 100, 'overlays[0] z-index is <= 100');
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
test('ensureMinimumZ() effects z-index', function(done) {
|
||||
Polymer.IronOverlayManager.ensureMinimumZ(1000);
|
||||
|
||||
runAfterOpen(overlays[0], function() {
|
||||
var styleZ = parseInt(window.getComputedStyle(overlays[0]).zIndex, 10);
|
||||
assert.isTrue(styleZ > 1000, 'overlays[0] z-index is <= 1000');
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
test('ensureMinimumZ() never decreases the minimum z-index', function(done) {
|
||||
Polymer.IronOverlayManager.ensureMinimumZ(1000);
|
||||
Polymer.IronOverlayManager.ensureMinimumZ(500);
|
||||
|
||||
runAfterOpen(overlays[0], function() {
|
||||
var styleZ = parseInt(window.getComputedStyle(overlays[0]).zIndex, 10);
|
||||
assert.isTrue(styleZ > 1000, 'overlays[0] z-index is <= 1000');
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
suite('overlays with backdrop', function() {
|
||||
var overlays;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue