OLD | NEW |
(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 <html> |
| 11 <head> |
| 12 |
| 13 <title>iron-input tests</title> |
| 14 |
| 15 <meta charset="utf-8"> |
| 16 <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| 17 <meta name="viewport" content="width=device-width, minimum-scale=1.0, initia
l-scale=1, user-scalable=yes"> |
| 18 |
| 19 <script src="../../webcomponentsjs/webcomponents-lite.js"></script> |
| 20 |
| 21 <script src="../../web-component-tester/browser.js"></script> |
| 22 <script src="../../test-fixture/test-fixture-mocha.js"></script> |
| 23 |
| 24 <link rel="import" href="../../test-fixture/test-fixture.html"> |
| 25 <link rel="import" href="../iron-input.html"> |
| 26 |
| 27 </head> |
| 28 <body> |
| 29 |
| 30 <test-fixture id="basic"> |
| 31 <template> |
| 32 <input is="iron-input"> |
| 33 </template> |
| 34 </test-fixture> |
| 35 |
| 36 <test-fixture id="has-value"> |
| 37 <template> |
| 38 <input is="iron-input" value="foobar"> |
| 39 </template> |
| 40 </test-fixture> |
| 41 |
| 42 <test-fixture id="has-bind-value"> |
| 43 <template> |
| 44 <input is="iron-input" bind-value="foobar"> |
| 45 </template> |
| 46 </test-fixture> |
| 47 |
| 48 <script> |
| 49 |
| 50 suite('basic', function() { |
| 51 |
| 52 test('setting bindValue sets value', function() { |
| 53 var input = fixture('basic'); |
| 54 input.bindValue = 'foobar'; |
| 55 assert.equal(input.value, input.bindValue, 'value equals to bindValue'); |
| 56 }); |
| 57 |
| 58 test('default value sets bindValue', function() { |
| 59 var input = fixture('has-value'); |
| 60 assert.equal(input.bindValue, input.value, 'bindValue equals value'); |
| 61 }); |
| 62 |
| 63 test('default bindValue sets value', function() { |
| 64 var input = fixture('has-bind-value'); |
| 65 assert.equal(input.value, input.bindValue, 'value equals to bindValue'); |
| 66 }); |
| 67 |
| 68 }); |
| 69 |
| 70 </script> |
| 71 |
| 72 </body> |
| 73 </html> |
OLD | NEW |