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

Unified Diff: ui/wm/core/visibility_controller_unittest.cc

Issue 851853002: It is time. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Trying to reup because the last upload failed. Created 5 years, 11 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 | « ui/wm/core/visibility_controller.cc ('k') | ui/wm/core/window_animations.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/wm/core/visibility_controller_unittest.cc
diff --git a/ui/wm/core/visibility_controller_unittest.cc b/ui/wm/core/visibility_controller_unittest.cc
deleted file mode 100644
index 01731ef2a213f1338f541762459038eb3a2dc2bb..0000000000000000000000000000000000000000
--- a/ui/wm/core/visibility_controller_unittest.cc
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ui/wm/core/visibility_controller.h"
-
-#include "ui/aura/test/aura_test_base.h"
-#include "ui/aura/test/test_window_delegate.h"
-#include "ui/aura/test/test_windows.h"
-#include "ui/aura/window.h"
-#include "ui/aura/window_event_dispatcher.h"
-#include "ui/compositor/layer.h"
-#include "ui/compositor/layer_animator.h"
-#include "ui/compositor/scoped_animation_duration_scale_mode.h"
-#include "ui/compositor/scoped_layer_animation_settings.h"
-
-namespace wm {
-
-typedef aura::test::AuraTestBase VisibilityControllerTest;
-
-// Check that a transparency change to 0 will not cause a hide call to be
-// ignored.
-TEST_F(VisibilityControllerTest, AnimateTransparencyToZeroAndHideHides) {
- // We cannot disable animations for this test.
- ui::ScopedAnimationDurationScaleMode test_duration_mode(
- ui::ScopedAnimationDurationScaleMode::NON_ZERO_DURATION);
-
- VisibilityController controller;
- aura::client::SetVisibilityClient(root_window(), &controller);
-
- SetChildWindowVisibilityChangesAnimated(root_window());
-
- aura::test::TestWindowDelegate d;
- scoped_ptr<aura::Window> window(aura::test::CreateTestWindowWithDelegate(
- &d, -2, gfx::Rect(0, 0, 50, 50), root_window()));
- ui::ScopedLayerAnimationSettings settings(window->layer()->GetAnimator());
- settings.SetTransitionDuration(base::TimeDelta::FromMilliseconds(5));
-
- EXPECT_TRUE(window->layer()->visible());
- EXPECT_TRUE(window->IsVisible());
-
- window->layer()->SetOpacity(0.0);
- EXPECT_TRUE(window->layer()->visible());
- EXPECT_TRUE(window->IsVisible());
- EXPECT_TRUE(window->layer()->GetAnimator()->
- IsAnimatingProperty(ui::LayerAnimationElement::OPACITY));
- EXPECT_EQ(0.0f, window->layer()->GetTargetOpacity());
-
- // Check that the visibility is correct after the hide animation has finished.
- window->Hide();
- window->layer()->GetAnimator()->StopAnimating();
- EXPECT_FALSE(window->layer()->visible());
- EXPECT_FALSE(window->IsVisible());
-}
-
-} // namespace wm
« no previous file with comments | « ui/wm/core/visibility_controller.cc ('k') | ui/wm/core/window_animations.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698