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

Side by Side Diff: polymer_1.0.4/bower_components/paper-material/test/paper-material.html

Issue 1205703007: Add polymer 1.0 to npm_modules (Closed) Base URL: https://chromium.googlesource.com/infra/third_party/npm_modules.git@master
Patch Set: Renamed folder to 1.0.4 Created 5 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!doctype html>
2 <!--
3 @license
4 Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
5 This code may only be used under the BSD style license found at http://polymer.g ithub.io/LICENSE.txt
6 The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
7 The complete set of contributors may be found at http://polymer.github.io/CONTRI BUTORS.txt
8 Code distributed by Google as part of the polymer project is also
9 subject to an additional IP rights grant found at http://polymer.github.io/PATEN TS.txt
10 -->
11 <html>
12 <head>
13 <meta charset="UTF-8">
14 <title>paper-material basic tests</title>
15 <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum- scale=1.0">
16
17 <script src="../../webcomponentsjs/webcomponents.js"></script>
18 <script src="../../web-component-tester/browser.js"></script>
19 <script src="../../test-fixture/test-fixture-mocha.js"></script>
20
21 <link href="../../test-fixture/test-fixture.html" rel="import">
22 <link href="../../layout/layout.html" rel="import">
23 <link href="../paper-material.html" rel="import">
24
25 </head>
26 <body>
27 <test-fixture id="TrivialCard">
28 <template>
29 <paper-material elevation="1"></paper-material>
30 </template>
31 </test-fixture>
32
33 <test-fixture id="ProgressiveElevations">
34 <template>
35 <paper-material elevation="1"></paper-material>
36 <paper-material elevation="2"></paper-material>
37 <paper-material elevation="3"></paper-material>
38 <paper-material elevation="4"></paper-material>
39 <paper-material elevation="5"></paper-material>
40 </template>
41 </test-fixture>
42
43 <script>
44 suite('<paper-material>', function() {
45 suite('with a non-zero elevation attribute', function() {
46 var style;
47 var card;
48
49 setup(function() {
50 card = fixture('TrivialCard');
51 style = window.getComputedStyle(card);
52 });
53
54 test('has a shadow', function() {
55 expect(style.boxShadow).to.be.ok;
56 expect(style.boxShadow).to.not.be.eql('none');
57 });
58
59 test('loses shadow with elevation value 0', function() {
60 card.elevation = 0;
61 expect(style.boxShadow).to.be.eql('none');
62 });
63 });
64
65 suite('progressively increasing values of elevation', function() {
66 var cards;
67
68 setup(function() {
69 cards = fixture('ProgressiveElevations');
70 });
71
72 test('yield progressively "deeper" cards', function() {
73 var lastStyle;
74 var style;
75
76 expect(cards.length).to.be.eql(5);
77
78 cards.forEach(function (card) {
79 style = window.getComputedStyle(card);
80
81 expect(style.boxShadow).to.be.ok;
82 expect(style.boxShadow).to.not.be.eql('none');
83 expect(style.boxShadow).to.not.be.eql(lastStyle && lastStyle.boxShad ow);
84
85 lastStyle = style;
86 });
87 });
88 });
89 });
90 </script>
91 </body>
92 </html>
OLDNEW
« no previous file with comments | « polymer_1.0.4/bower_components/paper-material/test/index.html ('k') | polymer_1.0.4/bower_components/paper-menu/.bower.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698