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

Side by Side Diff: chrome/test/data/webui/settings/animation_browsertest.js

Issue 2171373003: AnimationGroup for groups of transitions in Settings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
« no previous file with comments | « chrome/browser/resources/settings/settings_resources.grd ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** @fileoverview Tests for settings.animation. */ 5 /** @fileoverview Tests for settings.animation. */
6 6
7 /** @const {string} Path to root from chrome/test/data/webui/settings/. */ 7 /** @const {string} Path to root from chrome/test/data/webui/settings/. */
8 var ROOT_PATH = '../../../../../'; 8 var ROOT_PATH = '../../../../../';
9 9
10 /** 10 /**
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 var animation = new Animation(div, keyframes, options); 123 var animation = new Animation(div, keyframes, options);
124 animation.addEventListener('cancel', onCancelUnexpectedly); 124 animation.addEventListener('cancel', onCancelUnexpectedly);
125 animation.addEventListener('finish', onFinishBeforePromise); 125 animation.addEventListener('finish', onFinishBeforePromise);
126 126
127 // TODO(michaelpg): rAF seems more appropriate, but crbug.com/620160. 127 // TODO(michaelpg): rAF seems more appropriate, but crbug.com/620160.
128 setTimeout(function() { 128 setTimeout(function() {
129 expectEquals(100, div.clientHeight); 129 expectEquals(100, div.clientHeight);
130 130
131 animation.cancel(); 131 animation.cancel();
132 132
133 // The promise should resolve before the finish event is scheduled. 133 // The promise should be rejected before the cancel event is scheduled.
134 animation.finished.catch(function() { 134 animation.finished.catch(function() {
135 expectEquals(0, div.clientHeight); 135 expectEquals(0, div.clientHeight);
136 animation.removeEventListener('cancel', onCancelUnexpectedly); 136 animation.removeEventListener('cancel', onCancelUnexpectedly);
137 animation.addEventListener('cancel', function() { 137 animation.addEventListener('cancel', function() {
138 done(); 138 done();
139 }); 139 });
140 }); 140 });
141 }); 141 });
142 }); 142 });
143 }); 143 });
144 144
145 // Run all registered tests. 145 // Run all registered tests.
146 mocha.run(); 146 mocha.run();
147 }); 147 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/settings/settings_resources.grd ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698