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

Side by Side Diff: third_party/polymer/components/core-collapse/test/basic.html

Issue 1215543002: Remove Polymer 0.5. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix unit test 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) 2014 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 <html>
11 <head>
12 <meta charset="UTF-8">
13 <title>core-collapse-basic</title>
14 <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum- scale=1.0">
15
16 <script src="../../webcomponentsjs/webcomponents.js"></script>
17 <script src="../../web-component-tester/browser.js"></script>
18
19 <link rel="import" href="../core-collapse.html">
20
21 </head>
22 <body>
23
24 <core-collapse id="collapse" duration="0.1" opened>
25 <div>
26 Forma temperiemque cornua sidera dissociata cornua recessit innabilis ligavi t: solidumque coeptis nullus caelum sponte phoebe di regat mentisque tanta austr o capacius amphitrite sui quin postquam semina fossae liquidum umor galeae coept is caligine liberioris quin liquidum matutinis invasit posset: flexi glomeravit radiis certis invasit oppida postquam onerosior inclusum dominari opifex terris pace finxit quam aquae nunc sine altae auroram quam habentem homo totidemque scy thiam in pondus ensis tegit caecoque poena lapidosos humanas coeperunt poena aet as totidem nec natura aethera locavit caelumque distinxit animalibus phoebe cing ebant moderantum porrexerat terrae possedit sua sole diu summaque obliquis melio ris orbem
27 </div>
28 </core-collapse>
29
30 <script>
31
32 function getCollapseComputedStyle() {
33 var c = document.querySelector('#collapse');
34 return getComputedStyle(c);
35 }
36
37 var collapse = document.querySelector('#collapse');
38
39 var delay = 200;
40 var collapseHeight;
41
42 suite('basic', function() {
43
44 test('verify attribute', function() {
45 assert.equal(collapse.opened, true);
46 });
47
48 test('verify height', function(done) {
49 Polymer.flush();
50 setTimeout(function() {
51 collapseHeight = getCollapseComputedStyle().height;
52 // verify height
53 assert.notEqual(collapseHeight, '0px');
54 done();
55 }, delay);
56 });
57
58 test('test opened: false', function(done) {
59 collapse.opened = false;
60 Polymer.flush();
61 setTimeout(function() {
62 var h = getCollapseComputedStyle().height;
63 // verify height is 0px
64 assert.equal(h, '0px');
65 done();
66 }, delay);
67 });
68
69 test('test opened: true', function(done) {
70 collapse.opened = true;
71 Polymer.flush();
72 setTimeout(function() {
73 var h = getCollapseComputedStyle().height;
74 // verify height
75 assert.equal(h, collapseHeight);
76 done();
77 }, delay);
78 });
79
80 });
81
82 </script>
83
84 </body>
85 </html>
OLDNEW
« no previous file with comments | « third_party/polymer/components/core-collapse/index.html ('k') | third_party/polymer/components/core-collapse/test/index.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698