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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: polymer_1.0.4/bower_components/paper-material/test/paper-material.html
diff --git a/polymer_1.0.4/bower_components/paper-material/test/paper-material.html b/polymer_1.0.4/bower_components/paper-material/test/paper-material.html
new file mode 100644
index 0000000000000000000000000000000000000000..0a593fb581ab949aa3a6e12f0e8888cfe8eb0e8f
--- /dev/null
+++ b/polymer_1.0.4/bower_components/paper-material/test/paper-material.html
@@ -0,0 +1,92 @@
+<!doctype html>
+<!--
+@license
+Copyright (c) 2015 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-material 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="../../test-fixture/test-fixture-mocha.js"></script>
+
+ <link href="../../test-fixture/test-fixture.html" rel="import">
+ <link href="../../layout/layout.html" rel="import">
+ <link href="../paper-material.html" rel="import">
+
+</head>
+<body>
+ <test-fixture id="TrivialCard">
+ <template>
+ <paper-material elevation="1"></paper-material>
+ </template>
+ </test-fixture>
+
+ <test-fixture id="ProgressiveElevations">
+ <template>
+ <paper-material elevation="1"></paper-material>
+ <paper-material elevation="2"></paper-material>
+ <paper-material elevation="3"></paper-material>
+ <paper-material elevation="4"></paper-material>
+ <paper-material elevation="5"></paper-material>
+ </template>
+ </test-fixture>
+
+ <script>
+ suite('<paper-material>', function() {
+ suite('with a non-zero elevation attribute', function() {
+ var style;
+ var card;
+
+ setup(function() {
+ card = fixture('TrivialCard');
+ style = window.getComputedStyle(card);
+ });
+
+ test('has a shadow', function() {
+ expect(style.boxShadow).to.be.ok;
+ expect(style.boxShadow).to.not.be.eql('none');
+ });
+
+ test('loses shadow with elevation value 0', function() {
+ card.elevation = 0;
+ expect(style.boxShadow).to.be.eql('none');
+ });
+ });
+
+ suite('progressively increasing values of elevation', function() {
+ var cards;
+
+ setup(function() {
+ cards = fixture('ProgressiveElevations');
+ });
+
+ test('yield progressively "deeper" cards', function() {
+ var lastStyle;
+ var style;
+
+ expect(cards.length).to.be.eql(5);
+
+ cards.forEach(function (card) {
+ style = window.getComputedStyle(card);
+
+ expect(style.boxShadow).to.be.ok;
+ expect(style.boxShadow).to.not.be.eql('none');
+ expect(style.boxShadow).to.not.be.eql(lastStyle && lastStyle.boxShadow);
+
+ lastStyle = style;
+ });
+ });
+ });
+ });
+ </script>
+</body>
+</html>
« 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