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

Side by Side Diff: polymer_1.0.4/bower_components/iron-collapse/test/basic.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 Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
4 This code may only be used under the BSD style license found at http://polymer.g ithub.io/LICENSE.txt
5 The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
6 The complete set of contributors may be found at http://polymer.github.io/CONTRI BUTORS.txt
7 Code distributed by Google as part of the polymer project is also
8 subject to an additional IP rights grant found at http://polymer.github.io/PATEN TS.txt
9 -->
10
11 <html>
12 <head>
13
14 <title>iron-collapse-basic</title>
15 <meta charset="utf-8">
16 <meta name="viewport" content="width=device-width, initial-scale=1.0">
17
18 <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
19 <script src="../../web-component-tester/browser.js"></script>
20 <script src="../../test-fixture/test-fixture-mocha.js"></script>
21
22 <link rel="import" href="../../test-fixture/test-fixture.html">
23 <link rel="import" href="../iron-collapse.html">
24
25 </head>
26 <body>
27
28 <test-fixture id="test">
29 <template>
30 <iron-collapse id="collapse" opened>
31 <div>
32 Forma temperiemque cornua sidera dissociata cornua recessit innabili s ligavit: solidumque coeptis nullus caelum sponte phoebe di regat mentisque tan ta austro capacius amphitrite sui quin postquam semina fossae liquidum umor gale ae coeptis caligine liberioris quin liquidum matutinis invasit posset: flexi glo meravit radiis certis invasit oppida postquam onerosior inclusum dominari opifex terris pace finxit quam aquae nunc sine altae auroram quam habentem homo totide mque scythiam in pondus ensis tegit caecoque poena lapidosos humanas coeperunt p oena aetas totidem nec natura aethera locavit caelumque distinxit animalibus pho ebe cingebant moderantum porrexerat terrae possedit sua sole diu summaque obliqu is melioris orbem
33 </div>
34 </iron-collapse>
35 </template>
36 </test-fixture>
37
38 <script>
39
40 suite('basic', function() {
41
42 var collapse;
43 var delay = 500;
44 var collapseHeight;
45
46 setup(function () {
47 collapse = fixture('test');
48 });
49
50 test('opened attribute', function() {
51 assert.equal(collapse.opened, true);
52 });
53
54 test('horizontal attribute', function() {
55 assert.equal(collapse.horizontal, false);
56 });
57
58 test('default opened height', function(done) {
59 setTimeout(function() {
60 // store height
61 collapseHeight = getComputedStyle(collapse).height;
62 // verify height not 0px
63 assert.notEqual(collapseHeight, '0px');
64 done();
65 }, delay);
66 });
67
68 test('set opened to false', function(done) {
69 collapse.opened = false;
70 setTimeout(function() {
71 var h = getComputedStyle(collapse).height;
72 // verify height is 0px
73 assert.equal(h, '0px');
74 done();
75 }, delay);
76 });
77
78 test('set opened to true', function(done) {
79 collapse.opened = true;
80 setTimeout(function() {
81 var h = getComputedStyle(collapse).height;
82 // verify height
83 assert.equal(h, collapseHeight);
84 done();
85 }, delay);
86 });
87
88 });
89
90 </script>
91
92 </body>
93 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698