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

Unified Diff: third_party/polymer/components/paper-toast/test/basic.html

Issue 2113853002: Run bower update (Closed) Base URL: https://github.com/catapult-project/catapult@polymer10-migration
Patch Set: Created 4 years, 6 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
Index: third_party/polymer/components/paper-toast/test/basic.html
diff --git a/third_party/polymer/components/paper-toast/test/basic.html b/third_party/polymer/components/paper-toast/test/basic.html
index b56f4c67ddf67d1b407cd8f002cb8803e37cd300..154015d78374c932e352f560f29e9ebd24533a19 100644
--- a/third_party/polymer/components/paper-toast/test/basic.html
+++ b/third_party/polymer/components/paper-toast/test/basic.html
@@ -200,17 +200,20 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
}, 5);
});
- test('toast is positioned according at the bottom left of its fitInto', function() {
+ test('toast is positioned according at the bottom left of its fitInto', function(done) {
var f = fixture('contained');
var toast = f[0];
var container = f[1];
toast.fitInto = container;
- toast.center();
- var style = getComputedStyle(toast);
- assert.equal(style.left, '50px', 'left');
- // Should be 150px from top, (100px of height + 50px of margin-top)
- // aka window height - 150 from bottom.
- assert.equal(style.bottom, (window.innerHeight - 150) + 'px', 'bottom');
+ toast.open();
+ // Wait for it to be opened, so it will be sized correctly.
+ toast.addEventListener('iron-overlay-opened', function() {
+ var rect = toast.getBoundingClientRect();
+ assert.equal(rect.left, 50, 'left ok');
+ // 150px from top, (100px of height + 50px of margin-top)
+ assert.equal(rect.bottom, 150, 'bottom');
+ done();
+ });
});
suite('a11y', function() {
« no previous file with comments | « third_party/polymer/components/paper-toast/paper-toast.html ('k') | third_party/polymer/components/polymer/.bower.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698