OLD | NEW |
1 <!-- | 1 <!-- |
2 Copyright 2014 The Chromium Authors. All rights reserved. | 2 Copyright 2014 The Chromium Authors. All rights reserved. |
3 Use of this source code is governed by a BSD-style license that can be | 3 Use of this source code is governed by a BSD-style license that can be |
4 found in the LICENSE file. | 4 found in the LICENSE file. |
5 --> | 5 --> |
6 | 6 |
7 <link rel="import" href="../ct-party-time.html"> | 7 <link rel="import" href="../ct-party-time.html"> |
8 | 8 |
9 <script> | 9 <script> |
10 (function () { | 10 (function () { |
11 | 11 |
12 var assert = chai.assert; | 12 var assert = chai.assert; |
13 | 13 |
14 describe('ct-party-time', function() { | 14 describe('ct-party-time', function() { |
15 describe('party time: party', function() { | 15 describe('party time: party', function() { |
16 var partyTime; | 16 var partyTime; |
17 before(function(done) { | 17 before(function(done) { |
18 partyTime = document.createElement('ct-party-time'); | 18 partyTime = document.createElement('ct-party-time'); |
19 partyTime.partytime = true; | |
20 setTimeout(done); | 19 setTimeout(done); |
21 }); | 20 }); |
22 | 21 |
23 it('should have a party', function() { | 22 it('should have a party', function() { |
24 assert(partyTime.shadowRoot.querySelector('img')); | 23 assert(partyTime.shadowRoot.querySelector('img')); |
25 }); | 24 }); |
26 }); | 25 }); |
27 | |
28 describe('party time: no party', function() { | |
29 var partyTime; | |
30 before(function(done) { | |
31 partyTime = document.createElement('ct-party-time'); | |
32 partyTime.partytime = false; | |
33 setTimeout(done); | |
34 }); | |
35 | |
36 it('should not have a party', function() { | |
37 assert(!partyTime.shadowRoot.querySelector('img')); | |
38 }); | |
39 }); | |
40 }); | 26 }); |
41 | 27 |
42 })() | 28 })() |
43 </script> | 29 </script> |
OLD | NEW |