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

Unified Diff: tests/html/transition_event_test.dart

Issue 12211099: Fixing TransitionEnd event. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/html/html.status ('k') | tools/dom/scripts/generator.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/html/transition_event_test.dart
diff --git a/tests/html/transition_event_test.dart b/tests/html/transition_event_test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..c96b46b4dd0b5458e87e67c0a0efad689df90b64
--- /dev/null
+++ b/tests/html/transition_event_test.dart
@@ -0,0 +1,42 @@
+// Copyright (c) 2013, 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
+
+library transition_event_test;
+import '../../pkg/unittest/lib/unittest.dart';
+import '../../pkg/unittest/lib/html_individual_config.dart';
+import 'dart:html';
+
+main() {
+ useHtmlIndividualConfiguration();
+
+ group('supported', () {
+ test('supported', () {
+ expect(CssStyleDeclaration.supportsTransitions, true);
+ });
+ });
+
+ group('functional', () {
+ test('transitionEnd', () {
+ if (CssStyleDeclaration.supportsTransitions) {
+ var element = new DivElement();
+ document.body.append(element);
+
+ element.style.opacity = '0';
+ element.style.width = '100px';
+ element.style.height = '100px';
+ element.style.background = 'red';
+ element.style.transition = 'opacity .1s';
+
+ window.setTimeout(expectAsync0(() {
+ element.onTransitionEnd.first.then(expectAsync1((e) {
+ expect(e is TransitionEvent, isTrue);
+ expect(e.propertyName, 'opacity');
+ }));
+
+ element.style.opacity = '1';
+ }), 100);
+ }
+ });
+ });
+}
« no previous file with comments | « tests/html/html.status ('k') | tools/dom/scripts/generator.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698