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

Side by Side Diff: polymer_0.5.4/bower_components/paper-input/test/paper-input.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
(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>paper-input tests</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 <script src="../../polymer-gestures/test/js/fake.js"></script>
19
20 <script src="util.js"></script>
21
22 <link href="../paper-input.html" rel="import">
23
24 <style>
25 paper-input {
26 width: 400px;
27 }
28 </style>
29
30 </head>
31 <body>
32
33 <paper-input id="default"></paper-input>
34
35 <paper-input id="disabled" disabled label="disabled"></paper-input>
36
37 <script>
38
39 var fake = new Fake();
40
41 test('change event bubbles', function(done) {
42 var node = document.getElementById('default');
43 var changeAction = function() {
44 done();
45 node.removeEventListener('change', changeAction);
46 };
47 node.addEventListener('change', changeAction);
48 var input = node.shadowRoot.querySelector('input');
49 var e = new Event('change', {
50 bubbles: true
51 });
52 input.dispatchEvent(e);
53 });
54
55 test('cannot tap on disabled input', function(done) {
56 var node = document.getElementById('disabled');
57 fake.downOnNode(node);
58 fake.upOnNode(node);
59 setTimeout(function() {
60 assert.notStrictEqual(activeElement(), node.shadowRoot.querySelector('inpu t'));
61 done();
62 }, 10);
63 });
64
65 </script>
66
67 </body>
68 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698