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

Side by Side Diff: polymer_0.5.4/bower_components/paper-input/test/paper-autogrow-textarea.html

Issue 895523005: Added Polymer 0.5.4 (Closed) Base URL: https://chromium.googlesource.com/infra/third_party/npm_modules.git@master
Patch Set: Created 5 years, 10 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 Copyright (c) 2014 The Polymer Project Authors. All rights reserved. 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 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 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 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 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 8 subject to an additional IP rights grant found at http://polymer.github.io/PATEN TS.txt
9 --> 9 -->
10 <html> 10 <html>
11 <head> 11 <head>
12 <meta charset="UTF-8"> 12 <meta charset="UTF-8">
13 <title>paper-autogrow-textarea</title> 13 <title>paper-autogrow-textarea tests</title>
14 <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum- scale=1.0"> 14 <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum- scale=1.0">
15 15
16 <script src="../../webcomponentsjs/webcomponents.js"></script> 16 <script src="../../webcomponentsjs/webcomponents.js"></script>
17 <script src="../../web-component-tester/browser.js"></script> 17 <script src="../../web-component-tester/browser.js"></script>
18 18
19 <link href="../paper-autogrow-textarea.html" rel="import"> 19 <link href="../paper-autogrow-textarea.html" rel="import">
20 20
21 <style> 21 <style>
22 paper-autogrow-textarea { 22 paper-autogrow-textarea {
23 background-color: black; 23 background-color: black;
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 var h2 = a1.offsetHeight; 117 var h2 = a1.offsetHeight;
118 assert.ok(h2 < 3 * h1); 118 assert.ok(h2 < 3 * h1);
119 done(); 119 done();
120 }); 120 });
121 }); 121 });
122 122
123 test('mirror text is visibility:hidden', function() { 123 test('mirror text is visibility:hidden', function() {
124 assert.equal(getComputedStyle(a1.$.mirror).visibility, 'hidden'); 124 assert.equal(getComputedStyle(a1.$.mirror).visibility, 'hidden');
125 }); 125 });
126 126
127 test('grows with a long word', function(done) {
128 var h1 = a1.offsetHeight;
129
130 t1.value = Array(1000).join("P");
131 dispatchInputEvent(t1);
132
133 flush(function() {
134 var h2 = a1.offsetHeight;
135 assert.ok(h2 > h1);
136 assert.deepEqual(a1.getBoundingClientRect(), t1.getBoundingClientRect( ));
137 done();
138 });
139 });
140
127 }); 141 });
128 142
129 </script> 143 </script>
130 144
131 </body> 145 </body>
132 </html> 146 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698