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

Side by Side Diff: polymer_1.2.3/bower_components/paper-behaviors/test/paper-button-behavior.html

Issue 1581713003: [third_party] add polymer 1.2.3 (Closed) Base URL: https://chromium.googlesource.com/infra/third_party/npm_modules.git@master
Patch Set: 1.2.3 Created 4 years, 11 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
1 <!doctype html> 1 <!doctype html>
2 <!-- 2 <!--
3 @license 3 @license
4 Copyright (c) 2015 The Polymer Project Authors. All rights reserved. 4 Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
5 This code may only be used under the BSD style license found at http://polymer.g ithub.io/LICENSE.txt 5 This code may only be used under the BSD style license found at http://polymer.g ithub.io/LICENSE.txt
6 The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt 6 The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
7 The complete set of contributors may be found at http://polymer.github.io/CONTRI BUTORS.txt 7 The complete set of contributors may be found at http://polymer.github.io/CONTRI BUTORS.txt
8 Code distributed by Google as part of the polymer project is also 8 Code distributed by Google as part of the polymer project is also
9 subject to an additional IP rights grant found at http://polymer.github.io/PATEN TS.txt 9 subject to an additional IP rights grant found at http://polymer.github.io/PATEN TS.txt
10 --> 10 -->
(...skipping 21 matching lines...) Expand all
32 32
33 <script> 33 <script>
34 suite('basic', function() { 34 suite('basic', function() {
35 var button; 35 var button;
36 36
37 setup(function() { 37 setup(function() {
38 button = fixture('basic'); 38 button = fixture('basic');
39 }); 39 });
40 40
41 test('normal (no states)', function() { 41 test('normal (no states)', function() {
42 assert.equal(button._elevation, 1); 42 assert.equal(button.elevation, 1);
43 }); 43 });
44 44
45 test('set disabled property', function() { 45 test('set disabled property', function() {
46 button.disabled = true; 46 button.disabled = true;
47 assert.equal(button._elevation, 0); 47 assert.equal(button.elevation, 0);
48 }); 48 });
49 49
50 test('pressed and released', function() { 50 test('pressed and released', function() {
51 MockInteractions.down(button); 51 MockInteractions.down(button);
52 assert.equal(button._elevation, 4); 52 assert.equal(button.elevation, 4);
53 MockInteractions.up(button); 53 MockInteractions.up(button);
54 assert.equal(button._elevation, 1); 54 assert.equal(button.elevation, 1);
55 assert.ok(button.hasRipple());
55 }); 56 });
56 57
57 suite('a button with toggles', function() { 58 suite('a button with toggles', function() {
58 setup(function() { 59 setup(function() {
59 button.toggles = true; 60 button.toggles = true;
60 }); 61 });
61 62
62 test('activated by tap', function(done) { 63 test('activated by tap', function(done) {
63 MockInteractions.downAndUp(button, function() { 64 MockInteractions.downAndUp(button, function() {
64 try { 65 try {
65 assert.equal(button._elevation, 4); 66 assert.equal(button.elevation, 4);
67 assert.ok(button.hasRipple());
66 done(); 68 done();
67 } catch (e) { 69 } catch (e) {
68 done(e); 70 done(e);
69 } 71 }
70 }); 72 });
71 }); 73 });
72 }); 74 });
73 75
74 test('receives focused', function() { 76 test('receives focused', function() {
75 MockInteractions.focus(button); 77 MockInteractions.focus(button);
76 assert.equal(button._elevation, 3); 78 assert.equal(button.elevation, 3);
79 assert.ok(button.hasRipple());
77 }); 80 });
78 }); 81 });
79 </script> 82 </script>
80 83
81 </body> 84 </body>
82 </html> 85 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698