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

Side by Side Diff: test/paper_ripple_behavior_test.dart

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 | « test/paper_radio_group_basic_test.dart ('k') | test/paper_ripple_behavior_test.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 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4 @TestOn('browser')
5 library polymer_elements.test.paper_ripple_behavior_test;
6
7 import 'package:test/test.dart';
8 import 'package:polymer_elements/iron_a11y_keys_behavior.dart';
9 import 'package:polymer_elements/iron_button_state.dart';
10 import 'package:polymer_elements/iron_control_state.dart';
11 import 'package:polymer_elements/paper_ripple_behavior.dart';
12 import 'package:polymer/polymer.dart';
13 import 'common.dart';
14
15 main() async {
16 await initPolymer();
17
18 group('PaperRippleBehavior', () {
19 var ripple;
20
21 setUp(() {
22 ripple = fixture('basic');
23 });
24
25 test('no ripple at startup', () {
26 expect(ripple.hasRipple(), isFalse);
27 });
28
29 test('calling getRipple returns ripple', () {
30 expect(ripple.getRipple(), isNotNull);
31 });
32
33 test('focus generates ripple', () {
34 focus(ripple);
35 expect(ripple.hasRipple(), isTrue);
36 });
37
38 test('down generates ripple', () {
39 down(ripple);
40 expect(ripple.hasRipple(), isTrue);
41 up(ripple);
42 });
43
44 });
45 }
46
47 @PolymerRegister('test-ripple')
48 class TestRipple extends PolymerElement
49 with
50 IronA11yKeysBehavior,
51 IronButtonState,
52 IronControlState,
53 PaperRippleBehavior {
54 TestRipple.created() : super.created();
55 }
OLDNEW
« no previous file with comments | « test/paper_radio_group_basic_test.dart ('k') | test/paper_ripple_behavior_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698