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

Unified 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, 2 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/paper_ripple_behavior_test.dart
diff --git a/test/paper_ripple_behavior_test.dart b/test/paper_ripple_behavior_test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..ec0e9256a7ecfde58ac4f193ced7264f198462fc
--- /dev/null
+++ b/test/paper_ripple_behavior_test.dart
@@ -0,0 +1,55 @@
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+@TestOn('browser')
+library polymer_elements.test.paper_ripple_behavior_test;
+
+import 'package:test/test.dart';
+import 'package:polymer_elements/iron_a11y_keys_behavior.dart';
+import 'package:polymer_elements/iron_button_state.dart';
+import 'package:polymer_elements/iron_control_state.dart';
+import 'package:polymer_elements/paper_ripple_behavior.dart';
+import 'package:polymer/polymer.dart';
+import 'common.dart';
+
+main() async {
+ await initPolymer();
+
+ group('PaperRippleBehavior', () {
+ var ripple;
+
+ setUp(() {
+ ripple = fixture('basic');
+ });
+
+ test('no ripple at startup', () {
+ expect(ripple.hasRipple(), isFalse);
+ });
+
+ test('calling getRipple returns ripple', () {
+ expect(ripple.getRipple(), isNotNull);
+ });
+
+ test('focus generates ripple', () {
+ focus(ripple);
+ expect(ripple.hasRipple(), isTrue);
+ });
+
+ test('down generates ripple', () {
+ down(ripple);
+ expect(ripple.hasRipple(), isTrue);
+ up(ripple);
+ });
+
+ });
+}
+
+@PolymerRegister('test-ripple')
+class TestRipple extends PolymerElement
+ with
+ IronA11yKeysBehavior,
+ IronButtonState,
+ IronControlState,
+ PaperRippleBehavior {
+ TestRipple.created() : super.created();
+}
« 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