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

Side by Side Diff: polymer_1.0.4/bower_components/iron-collapse/test/horizontal.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, 5 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 <title>iron-collapse-horizontal</title>
14 <meta charset="utf-8">
15 <meta name="viewport" content="width=device-width, initial-scale=1.0">
16
17 <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
18 <script src="../../web-component-tester/browser.js"></script>
19 <script src="../../test-fixture/test-fixture-mocha.js"></script>
20
21 <link rel="import" href="../../test-fixture/test-fixture.html">
22 <link rel="import" href="../iron-collapse.html">
23 </head>
24 <body>
25
26 <test-fixture id="test">
27 <template>
28 <iron-collapse id="collapse" opened horizontal>
29 <div>
30 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
31 </div>
32 </iron-collapse>
33 </template>
34 </test-fixture>
35
36 <script>
37
38 suite('horizontal', function() {
39
40 var collapse;
41 var delay = 500;
42 var collapseHeight;
43
44 setup(function () {
45 collapse = fixture('test');
46 });
47
48 test('opened attribute', function() {
49 assert.equal(collapse.opened, true);
50 });
51
52 test('horizontal attribute', function() {
53 assert.equal(collapse.horizontal, true);
54 });
55
56 test('default opened width', function(done) {
57 setTimeout(function() {
58 // store actual width
59 width = getComputedStyle(collapse).width;
60 // verify width not 0px
61 assert.notEqual(width, '0px');
62 done();
63 }, delay);
64 });
65
66 test('set opened to false', function(done) {
67 collapse.opened = false;
68 setTimeout(function() {
69 var h = getComputedStyle(collapse).width;
70 // verify width is 0px
71 assert.equal(h, '0px');
72 done();
73 }, delay);
74 });
75
76 test('set opened to true', function(done) {
77 collapse.opened = true;
78 setTimeout(function() {
79 var h = getComputedStyle(collapse).width;
80 // verify width
81 assert.equal(h, width);
82 done();
83 }, delay);
84 });
85
86 });
87
88 </script>
89
90 </body>
91 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698