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

Side by Side Diff: test/codegen/lib/html/element_animate_test.dart

Issue 1930043002: Add all dart:html tests from the sdk to test/codegen. (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: ptal Created 4 years, 7 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 // 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
5 library element_animate_test;
6
7 import 'dart:async';
8 import 'dart:html';
9 import 'package:unittest/html_individual_config.dart';
10 import 'package:unittest/unittest.dart';
11
12 main() {
13 useHtmlIndividualConfiguration();
14
15 group('animate_supported', () {
16 test('supported', () {
17 expect(Animation.supported, isTrue);
18 });
19 });
20
21 group('simple_timing', () {
22 test('simple timing', () {
23 var body = document.body;
24 var opacity = num.parse(body.getComputedStyle().opacity);
25 body.animate([{"opacity": 100}, {"opacity": 0}], 100);
26 var newOpacity = num.parse(body.getComputedStyle().opacity);
27 expect(newOpacity == opacity, isTrue);
28 });
29 });
30
31 group('timing_dict', () {
32 test('timing dict', () {
33 var body = document.body;
34 // Animate different characteristics so the tests can run concurrently.
35 var fontSize = body.getComputedStyle().fontSize;
36 var player = body.animate(
37 [{"font-size": "500px"}, {"font-size": fontSize}], {"duration": 100});
38 var newFontSize = body.getComputedStyle().fontSize;
39 // Don't bother to parse to numbers, as long as it's changed that
40 // indicates something is happening.
41 expect(newFontSize == fontSize, isFalse);
42 player.on['finish'].listen(expectAsync((_) => 'done'));
43 });
44 });
45
46 group('omit_timing', () {
47 test('omit timing', () {
48 var body = document.body;
49 var player = body.animate([
50 {"transform": "translate(100px, -100%)"},
51 {"transform": "translate(400px, 500px)"}
52 ]);
53 player.on['finish'].listen(expectAsync((_) => 'done'));
54 });
55 });
56 }
OLDNEW
« no previous file with comments | « test/codegen/lib/html/element_add_test.dart ('k') | test/codegen/lib/html/element_classes_svg_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698