| <!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> |
| <meta charset="UTF-8"> |
| <title>paper-shadow basic tests</title> |
| <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"> |
| |
| <script src="../../webcomponentsjs/webcomponents.js"></script> |
| <script src="../../web-component-tester/browser.js"></script> |
| <script src="../../polymer-gestures/test/js/fake.js"></script> |
| |
| <link href="../paper-shadow.html" rel="import"> |
| |
| <style> |
| .card { |
| width: 100px; |
| height: 100px; |
| } |
| </style> |
| |
| </head> |
| <body> |
| |
| <paper-shadow id="s1" class="card"></paper-shadow> |
| |
| <paper-shadow id="s2" class="card"> |
| <div id="foo">hi!</div> |
| </paper-shadow> |
| |
| <script> |
| |
| var s1 = document.getElementById('s1'); |
| |
| var fake = new Fake(); |
| |
| test('default', function() { |
| assert.notEqual(getComputedStyle(s1.$['shadow-bottom'])['box-shadow'], 'none'); |
| }); |
| |
| test('shadows are pointer-events: none', function(done) { |
| var foo = document.getElementById('foo'); |
| PolymerGestures.addEventListener(wrap(document), 'tap', function(e) { |
| assert.strictEqual(e.target, foo); |
| done(); |
| }); |
| fake.downOnNode(foo, function() { |
| fake.upOnNode(foo); |
| }); |
| }); |
| |
| </script> |
| |
| </body> |
| </html> |