summaryrefslogtreecommitdiffstats
path: root/ui/aura/window_unittest.cc
diff options
context:
space:
mode:
authorvollick@google.com <vollick@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-01 20:19:47 +0000
committervollick@google.com <vollick@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-01 20:19:47 +0000
commitc15d15684de184481066b875ca7bbc9829069274 (patch)
treec52fdc9cf9bfd6083cda8e284bdde1936b1a2585 /ui/aura/window_unittest.cc
parent6714272cdb8fedfc02ec66483a0a2b8fbdab3cf6 (diff)
downloadchromium_src-c15d15684de184481066b875ca7bbc9829069274.zip
chromium_src-c15d15684de184481066b875ca7bbc9829069274.tar.gz
chromium_src-c15d15684de184481066b875ca7bbc9829069274.tar.bz2
Reland 120074 -- Disable animations during aura tests.
This causes all animations scheduled during a test to complete immediately. After making this change, I noticed some code assumed that animations would not complete synchronously. Some of this code used animation observers, and I while fixing the code I have updated it to use the preferred ImplicitAnimationObserver. BUG=None TEST=aura_shell_unittests,aura_unittests,compositor_unittests Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=120074 Review URL: https://chromiumcodereview.appspot.com/9222018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@120092 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/aura/window_unittest.cc')
-rw-r--r--ui/aura/window_unittest.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/ui/aura/window_unittest.cc b/ui/aura/window_unittest.cc
index 1e59c2d..78b9142 100644
--- a/ui/aura/window_unittest.cc
+++ b/ui/aura/window_unittest.cc
@@ -933,6 +933,9 @@ TEST_F(WindowTest, Property) {
}
TEST_F(WindowTest, SetBoundsInternalShouldCheckTargetBounds) {
+ // We cannot short-circuit animations in this test.
+ ui::LayerAnimator::set_disable_animations_for_test(false);
+
scoped_ptr<Window> w1(
CreateTestWindowWithBounds(gfx::Rect(0, 0, 100, 100), NULL));
@@ -966,7 +969,7 @@ TEST_F(WindowTest, SetBoundsInternalShouldCheckTargetBounds) {
// Confirm that the target bounds are reached.
base::TimeTicks start_time =
- w1->layer()->GetAnimator()->get_last_step_time_for_test();
+ w1->layer()->GetAnimator()->last_step_time();
element->Step(start_time + base::TimeDelta::FromMilliseconds(1000));