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

Side by Side Diff: lib/src/paper-slider/test/a11y.html

Issue 1418513006: update elements and fix some bugs (Closed) Base URL: git@github.com:dart-lang/polymer_elements.git@master
Patch Set: code review updates Created 5 years, 1 month 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
« no previous file with comments | « lib/src/paper-slider/paper-slider.html ('k') | lib/src/paper-styles/paper-styles.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!doctype html>
2 <!--
3 @license
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
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
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
10 -->
11 <html>
12 <head>
13 <meta charset="UTF-8">
14 <title>paper-slider a11y test</title>
15 <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum- scale=1.0">
16
17 <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
18 <script src="../../web-component-tester/browser.js"></script>
19 <script src="../../test-fixture/test-fixture-mocha.js"></script>
20 <script src="../../iron-test-helpers/mock-interactions.js"></script>
21
22 <link rel="import" href="../paper-slider.html">
23 <link rel="import" href="../../test-fixture/test-fixture.html">
24 </head>
25 <body>
26
27 <test-fixture id="trivialSlider">
28 <template>
29 <paper-slider min="0" max="100" value="50"></paper-slider>
30 </template>
31 </test-fixture>
32
33 <script>
34 suite('a11y', function() {
35 var slider;
36
37 setup(function() {
38 slider = fixture('trivialSlider');
39 });
40
41 test('has aria role "slider"', function() {
42 assert.equal(slider.getAttribute('role'), 'slider');
43 assert.equal(slider.getAttribute('aria-valuemin'), slider.min);
44 assert.equal(slider.getAttribute('aria-valuemax'), slider.max);
45 assert.equal(slider.getAttribute('aria-valuenow'), slider.value);
46 });
47
48 test('interacting without keyboard causes no ripple', function() {
49 MockInteractions.down(slider.$.sliderKnob);
50 assert.isTrue(slider.hasRipple());
51 var ripple = slider.getRipple();
52 assert.equal(ripple.offsetHeight, 0);
53 assert.equal(ripple.offsetWidth, 0);
54 });
55
56 test('interacting with keyboard causes ripple', function() {
57 MockInteractions.focus(slider);
58 MockInteractions.pressSpace(slider.$.sliderKnob);
59 assert.isTrue(slider.hasRipple());
60 var ripple = slider.getRipple();
61 assert.isAbove(ripple.offsetHeight, 0);
62 assert.isAbove(ripple.offsetWidth, 0);
63 });
64
65 a11ySuite('trivialSlider');
66
67 });
68
69 </script>
70
71 </body>
72 </html>
OLDNEW
« no previous file with comments | « lib/src/paper-slider/paper-slider.html ('k') | lib/src/paper-styles/paper-styles.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698