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

Unified Diff: ash/wm/panels/panel_window_resizer_unittest.cc

Issue 557693002: [Ash] Only snap windows that can maximize. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix up other tests. Created 6 years, 3 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
Index: ash/wm/panels/panel_window_resizer_unittest.cc
diff --git a/ash/wm/panels/panel_window_resizer_unittest.cc b/ash/wm/panels/panel_window_resizer_unittest.cc
index 42abd7d792a86ba1e84d75540016500cf8c61fbb..2177154ad91e5a1bd2ad65818c6ce82b4838f593 100644
--- a/ash/wm/panels/panel_window_resizer_unittest.cc
+++ b/ash/wm/panels/panel_window_resizer_unittest.cc
@@ -23,6 +23,7 @@
#include "ash/wm/wm_event.h"
#include "base/win/windows_version.h"
#include "ui/aura/client/aura_constants.h"
+#include "ui/aura/test/test_window_delegate.h"
#include "ui/aura/window_event_dispatcher.h"
#include "ui/base/hit_test.h"
#include "ui/base/l10n/l10n_util.h"
@@ -401,8 +402,11 @@ TEST_F(PanelWindowResizerTest, AttachToSecondFullscreenDisplay) {
aura::Window::Windows root_windows = Shell::GetAllRootWindows();
scoped_ptr<aura::Window> window(
CreatePanelWindow(gfx::Point(0, 0)));
- scoped_ptr<aura::Window> fullscreen(
- CreateTestWindowInShellWithBounds(gfx::Rect(600, 0, 101, 101)));
+ scoped_ptr<aura::Window> fullscreen(CreateTestWindowInShellWithDelegate(
+ aura::test::TestWindowDelegate::CreateSelfDestroyingDelegate(),
+ 0,
+ gfx::Rect(600, 0, 101, 101)));
+ fullscreen->SetProperty(aura::client::kCanMaximizeKey, true);
wm::GetWindowState(fullscreen.get())->Activate();
const wm::WMEvent event(wm::WM_EVENT_TOGGLE_FULLSCREEN);
wm::GetWindowState(fullscreen.get())->OnWMEvent(&event);

Powered by Google App Engine
This is Rietveld 408576698