This repository has been archived by the owner on Mar 13, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 20
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 #35 from jakemac53/test
add test for opening and closing in quick succession
- Loading branch information
Showing
2 changed files
with
46 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<!doctype html> | ||
<!-- | ||
Copyright (c) 2014 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.txt | ||
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt | ||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt | ||
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.txt | ||
--> | ||
<html> | ||
<head> | ||
<title>core-overlay</title> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"> | ||
<script src="../../../webcomponentsjs/webcomponents.js"></script> | ||
<script src="../../../polymer-test-tools/chai/chai.js"></script> | ||
<script src="../../../polymer-test-tools/htmltest.js"></script> | ||
<link rel="import" href="../../../core-transition/core-transition-css.html"> | ||
<link rel="import" href="../../core-overlay.html"> | ||
</head> | ||
<body unresolved> | ||
|
||
<core-overlay>my overlay</core-overlay> | ||
|
||
<script> | ||
document.addEventListener('polymer-ready', function() { | ||
var overlay = document.querySelector('core-overlay'); | ||
|
||
asyncSeries([ | ||
function(next) { | ||
// First, open the overlay. | ||
overlay.open(); | ||
setTimeout(function() { | ||
// During the opening transition, close the overlay. | ||
overlay.close(); | ||
// Wait for any exceptions to be thrown until the transition is done. | ||
setTimeout(function() { next(); }, 300); | ||
}, 100); | ||
}, | ||
], 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