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

Unified Diff: ash/wm/immersive_fullscreen_controller.cc

Issue 2251213004: Moves ImmersiveFullscreenController::SetupForTest into test class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: feedback Created 4 years, 4 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 | « ash/wm/immersive_fullscreen_controller.h ('k') | ash/wm/immersive_fullscreen_controller_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/immersive_fullscreen_controller.cc
diff --git a/ash/wm/immersive_fullscreen_controller.cc b/ash/wm/immersive_fullscreen_controller.cc
index d284041fa66a778157cab97968b6d966a15f4aab..67c0050d42e93ef5869d66fa3cab60451e387b3c 100644
--- a/ash/wm/immersive_fullscreen_controller.cc
+++ b/ash/wm/immersive_fullscreen_controller.cc
@@ -17,7 +17,6 @@
#include "ash/wm/immersive_focus_watcher.h"
#include "ash/wm/immersive_gesture_handler.h"
#include "base/metrics/histogram.h"
-#include "ui/aura/env.h"
#include "ui/display/display.h"
#include "ui/display/screen.h"
#include "ui/events/base_event_utils.h"
@@ -173,26 +172,6 @@ ImmersiveRevealedLock* ImmersiveFullscreenController::GetRevealedLock(
}
////////////////////////////////////////////////////////////////////////////////
-// Testing interface:
-
-void ImmersiveFullscreenController::SetupForTest() {
- DCHECK(!enabled_);
- animations_disabled_for_test_ = true;
-
- // Move the mouse off of the top-of-window views so that it does not keep the
- // top-of-window views revealed.
- std::vector<gfx::Rect> bounds_in_screen(
- delegate_->GetVisibleBoundsInScreen());
- DCHECK(!bounds_in_screen.empty());
- int bottommost_in_screen = bounds_in_screen[0].bottom();
- for (size_t i = 1; i < bounds_in_screen.size(); ++i) {
- if (bounds_in_screen[i].bottom() > bottommost_in_screen)
- bottommost_in_screen = bounds_in_screen[i].bottom();
- }
- gfx::Point cursor_pos(0, bottommost_in_screen + 100);
- aura::Env::GetInstance()->set_last_mouse_location(cursor_pos);
- UpdateLocatedEventRevealedLock();
-}
void ImmersiveFullscreenController::OnMouseEvent(
const ui::MouseEvent& event,
« no previous file with comments | « ash/wm/immersive_fullscreen_controller.h ('k') | ash/wm/immersive_fullscreen_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698