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

Unified Diff: ash/wm/session_state_animator_impl_unittest.cc

Issue 2823343006: cros: Fix unlock crash with multi-display (Closed)
Patch Set: fix typo Created 3 years, 8 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
« ash/wm/session_state_animator.h ('K') | « ash/wm/session_state_animator_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/session_state_animator_impl_unittest.cc
diff --git a/ash/wm/session_state_animator_impl_unittest.cc b/ash/wm/session_state_animator_impl_unittest.cc
index 05be53c0549958e61e6976c311e265f20faa4b6d..f4cff04deed27908bff5d55992e43dbef1850fe2 100644
--- a/ash/wm/session_state_animator_impl_unittest.cc
+++ b/ash/wm/session_state_animator_impl_unittest.cc
@@ -2,11 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "ash/wm/session_state_animator_impl.h"
+
#include "ash/public/cpp/shell_window_ids.h"
#include "ash/shell.h"
#include "ash/test/ash_test_base.h"
#include "ash/wm/session_state_animator.h"
-#include "ash/wm/session_state_animator_impl.h"
+#include "base/bind.h"
+#include "base/run_loop.h"
#include "ui/aura/client/aura_constants.h"
typedef ash::test::AshTestBase SessionStateAnimatiorImplContainersTest;
@@ -80,4 +83,19 @@ TEST_F(SessionStateAnimatiorImplContainersTest, ContainersHaveIdTest) {
EXPECT_TRUE(containers.empty());
}
+TEST_F(SessionStateAnimatiorImplContainersTest,
James Cook 2017/04/19 16:41:45 nit: Reference the bug or explain what this is tes
xiyuan 2017/04/19 17:30:19 Done.
+ AnimationCallbackOnMultiDisplay) {
+ UpdateDisplay("200x200,400x400");
+
+ int callback_count = 0;
+ SessionStateAnimatorImpl animator;
+ animator.StartAnimationWithCallback(
+ SessionStateAnimator::LOCK_SCREEN_CONTAINERS,
+ SessionStateAnimator::ANIMATION_LIFT,
+ SessionStateAnimator::ANIMATION_SPEED_IMMEDIATE,
+ base::Bind([](int* count) { ++(*count); }, &callback_count));
+ base::RunLoop().RunUntilIdle();
+ EXPECT_EQ(1, callback_count);
+}
+
} // namespace ash
« ash/wm/session_state_animator.h ('K') | « ash/wm/session_state_animator_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698