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

Side by Side Diff: ash/display/multi_display_manager_unittest.cc

Issue 10828133: Desktop Aura: Allow tab drags out of window. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleanup Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ash/display/display_controller_unittest.cc ('k') | ash/wm/toplevel_window_event_filter.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/display/multi_display_manager.h" 5 #include "ash/display/multi_display_manager.h"
6 6
7 #include "ash/display/display_controller.h" 7 #include "ash/display/display_controller.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "ash/test/ash_test_base.h" 9 #include "ash/test/ash_test_base.h"
10 #include "base/format_macros.h" 10 #include "base/format_macros.h"
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 aura::DisplayManager::set_use_fullscreen_host_window(false); 191 aura::DisplayManager::set_use_fullscreen_host_window(false);
192 } 192 }
193 193
194 // Test in emulation mode (use_fullscreen_host_window=false) 194 // Test in emulation mode (use_fullscreen_host_window=false)
195 TEST_F(MultiDisplayManagerTest, MAYBE_EmulatorTest) { 195 TEST_F(MultiDisplayManagerTest, MAYBE_EmulatorTest) {
196 EXPECT_EQ(1U, display_manager()->GetNumDisplays()); 196 EXPECT_EQ(1U, display_manager()->GetNumDisplays());
197 197
198 internal::MultiDisplayManager::AddRemoveDisplay(); 198 internal::MultiDisplayManager::AddRemoveDisplay();
199 // Update primary and add seconary. 199 // Update primary and add seconary.
200 EXPECT_EQ(2U, display_manager()->GetNumDisplays()); 200 EXPECT_EQ(2U, display_manager()->GetNumDisplays());
201 #if defined(OS_WIN)
202 // TODO(oshima): Windows receives resize event for some reason.
203 EXPECT_EQ("1 1 0", GetCountSummary()); 201 EXPECT_EQ("1 1 0", GetCountSummary());
204 #else
205 EXPECT_EQ("0 1 0", GetCountSummary());
206 #endif
207 reset(); 202 reset();
208 203
209 internal::MultiDisplayManager::CycleDisplay(); 204 internal::MultiDisplayManager::CycleDisplay();
210 EXPECT_EQ(2U, display_manager()->GetNumDisplays()); 205 EXPECT_EQ(2U, display_manager()->GetNumDisplays());
211 // Observer gets called twice in this mode because 206 // Observer gets called twice in this mode because
212 // it gets notified both from |OnNativeDisplayChagned| 207 // it gets notified both from |OnNativeDisplayChagned|
213 // and from |RootWindowObserver|, which is the consequence of 208 // and from |RootWindowObserver|, which is the consequence of
214 // |SetHostSize()|. 209 // |SetHostSize()|.
215 EXPECT_EQ("4 0 0", GetCountSummary()); 210 EXPECT_EQ("4 0 0", GetCountSummary());
216 reset(); 211 reset();
(...skipping 26 matching lines...) Expand all
243 UpdateDisplay("1000x600*2"); 238 UpdateDisplay("1000x600*2");
244 EXPECT_EQ(2, 239 EXPECT_EQ(2,
245 Shell::GetPrimaryRootWindow()->compositor()->device_scale_factor()); 240 Shell::GetPrimaryRootWindow()->compositor()->device_scale_factor());
246 EXPECT_EQ("500x300", 241 EXPECT_EQ("500x300",
247 Shell::GetPrimaryRootWindow()->bounds().size().ToString()); 242 Shell::GetPrimaryRootWindow()->bounds().size().ToString());
248 aura::DisplayManager::set_use_fullscreen_host_window(false); 243 aura::DisplayManager::set_use_fullscreen_host_window(false);
249 } 244 }
250 245
251 } // namespace test 246 } // namespace test
252 } // namespace ash 247 } // namespace ash
OLDNEW
« no previous file with comments | « ash/display/display_controller_unittest.cc ('k') | ash/wm/toplevel_window_event_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698