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

Unified Diff: ash/wm/maximize_mode/maximize_mode_window_manager_unittest.cc

Issue 2617733002: Hide docked windows behind a flag (Closed)
Patch Set: Fix tests failed because of DCHECK Created 3 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
Index: ash/wm/maximize_mode/maximize_mode_window_manager_unittest.cc
diff --git a/ash/wm/maximize_mode/maximize_mode_window_manager_unittest.cc b/ash/wm/maximize_mode/maximize_mode_window_manager_unittest.cc
index 7c25413e34cdf24c865e5dd9fb052ab454fec04f..9b3bad9af76a901885a68eb8fbe98ac448876574 100644
--- a/ash/wm/maximize_mode/maximize_mode_window_manager_unittest.cc
+++ b/ash/wm/maximize_mode/maximize_mode_window_manager_unittest.cc
@@ -7,6 +7,7 @@
#include <string>
#include "ash/aura/wm_window_aura.h"
+#include "ash/common/ash_switches.h"
#include "ash/common/shelf/wm_shelf.h"
#include "ash/common/wm/maximize_mode/maximize_mode_controller.h"
#include "ash/common/wm/mru_window_tracker.h"
@@ -24,6 +25,7 @@
#include "ash/wm/window_properties.h"
#include "ash/wm/window_state_aura.h"
#include "ash/wm/window_util.h"
+#include "base/command_line.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
#include "base/values.h"
@@ -1571,6 +1573,10 @@ TEST_F(MaximizeModeWindowManagerTest, AlwaysOnTopWindows) {
// Tests that docked windows are not maximized, and not tracked.
TEST_F(MaximizeModeWindowManagerTest, DontMaximizeDockedWindows) {
+ // Enable window docking for this test.
+ base::CommandLine::ForCurrentProcess()->AppendSwitch(
+ ash::switches::kAshEnableDockedWindows);
+
gfx::Rect rect(10, 10, 200, 50);
std::unique_ptr<aura::Window> window(
CreateWindow(ui::wm::WINDOW_TYPE_NORMAL, rect));

Powered by Google App Engine
This is Rietveld 408576698