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

Unified Diff: ash/display/display_manager_unittest.cc

Issue 11428066: Use WS_POPUP for ash_unittests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years 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/display/display_controller_unittest.cc ('k') | ash/extended_desktop_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/display/display_manager_unittest.cc
diff --git a/ash/display/display_manager_unittest.cc b/ash/display/display_manager_unittest.cc
index e7378b63e59a8c064efdeef5df9eb0294a5e4930..287d83d254f3ac800141b4e6335c8516309c8767 100644
--- a/ash/display/display_manager_unittest.cc
+++ b/ash/display/display_manager_unittest.cc
@@ -95,21 +95,7 @@ class DisplayManagerTest : public test::AshTestBase,
DISALLOW_COPY_AND_ASSIGN(DisplayManagerTest);
};
-#if defined(OS_CHROMEOS)
-// TODO(oshima): This fails with non extended desktop on windows.
-// Reenable when extended desktop is enabled by default.
-#define MAYBE_NativeDisplayTest NativeDisplayTest
-#define MAYBE_EmulatorTest EmulatorTest
-#define MAYBE_OverscanInsetsTest OverscanInsetsTest
-#define MAYBE_ZeroOverscanInsets ZeroOverscanInsets
-#else
-#define MAYBE_NativeDisplayTest DISABLED_NativeDisplayTest
-#define MAYBE_EmulatorTest DISABLED_EmulatorTest
-#define MAYBE_OverscanInsetsTest DISABLED_OverscanInsetsTest
-#define MAYBE_ZeroOverscanInsets DISABLED_ZeroOverscanInsets
-#endif
-
-TEST_F(DisplayManagerTest, MAYBE_NativeDisplayTest) {
+TEST_F(DisplayManagerTest, NativeDisplayTest) {
EXPECT_EQ(1U, display_manager()->GetNumDisplays());
// Update primary and add seconary.
@@ -133,24 +119,24 @@ TEST_F(DisplayManagerTest, MAYBE_NativeDisplayTest) {
reset();
// Change primary.
- UpdateDisplay("0+0-1000x600");
+ UpdateDisplay("1+1-1000x600");
EXPECT_EQ("1 0 0", GetCountSummary());
EXPECT_EQ(display_manager()->GetDisplayAt(0)->id(), changed()[0].id());
EXPECT_EQ("0,0 1000x600", changed()[0].bounds().ToString());
reset();
// Add secondary.
- UpdateDisplay("0+0-1000x600,1001+0-600x400");
+ UpdateDisplay("1+1-1000x600,1002+0-600x400");
EXPECT_EQ(2U, display_manager()->GetNumDisplays());
EXPECT_EQ("0 1 0", GetCountSummary());
EXPECT_EQ(display_manager()->GetDisplayAt(1)->id(), added()[0].id());
// Secondary display is on right.
EXPECT_EQ("1000,0 600x400", added()[0].bounds().ToString());
- EXPECT_EQ("1001,0 600x400", added()[0].bounds_in_pixel().ToString());
+ EXPECT_EQ("1002,0 600x400", added()[0].bounds_in_pixel().ToString());
reset();
// Secondary removed, primary changed.
- UpdateDisplay("0+0-800x300");
+ UpdateDisplay("1+1-800x300");
EXPECT_EQ(1U, display_manager()->GetNumDisplays());
EXPECT_EQ("1 0 1", GetCountSummary());
EXPECT_EQ(display_manager()->GetDisplayAt(0)->id(), changed()[0].id());
@@ -197,7 +183,7 @@ TEST_F(DisplayManagerTest, MAYBE_NativeDisplayTest) {
}
// Test in emulation mode (use_fullscreen_host_window=false)
-TEST_F(DisplayManagerTest, MAYBE_EmulatorTest) {
+TEST_F(DisplayManagerTest, EmulatorTest) {
EXPECT_EQ(1U, display_manager()->GetNumDisplays());
DisplayManager::CycleDisplay();
@@ -217,7 +203,7 @@ TEST_F(DisplayManagerTest, MAYBE_EmulatorTest) {
reset();
}
-TEST_F(DisplayManagerTest, MAYBE_OverscanInsetsTest) {
+TEST_F(DisplayManagerTest, OverscanInsetsTest) {
UpdateDisplay("0+0-500x500,0+501-400x400");
reset();
ASSERT_EQ(2u, display_manager()->GetNumDisplays());
@@ -291,7 +277,7 @@ TEST_F(DisplayManagerTest, MAYBE_OverscanInsetsTest) {
GetPrimaryDisplay().bounds_in_pixel().ToString());
}
-TEST_F(DisplayManagerTest, MAYBE_ZeroOverscanInsets) {
+TEST_F(DisplayManagerTest, ZeroOverscanInsets) {
// Make sure the display change events is emitted for overscan inset changes.
UpdateDisplay("0+0-500x500,0+501-400x400");
ASSERT_EQ(2u, display_manager()->GetNumDisplays());
@@ -312,20 +298,7 @@ TEST_F(DisplayManagerTest, MAYBE_ZeroOverscanInsets) {
EXPECT_EQ(display2_id, changed()[0].id());
}
-// TODO(oshima): Device scale factor is supported on chromeos only for now.
-#if defined(OS_CHROMEOS)
-#define MAYBE_TestDeviceScaleOnlyChange TestDeviceScaleOnlyChange
-#define MAYBE_TestNativeDisplaysChanged TestNativeDisplaysChanged
-#define MAYBE_NativeDisplaysChangedAfterPrimaryChange \
- NativeDisplaysChangedAfterPrimaryChange
-#else
-#define MAYBE_TestDeviceScaleOnlyChange DISABLED_TestDeviceScaleOnlyChange
-#define MAYBE_TestNativeDisplaysChanged DISABLED_TestNativeDisplaysChanged
-#define MAYBE_NativeDisplaysChangedAfterPrimaryChange \
- DISABLED_NativeDisplaysChangedAfterPrimaryChange
-#endif
-
-TEST_F(DisplayManagerTest, MAYBE_TestDeviceScaleOnlyChange) {
+TEST_F(DisplayManagerTest, TestDeviceScaleOnlyChange) {
UpdateDisplay("1000x600");
EXPECT_EQ(1,
Shell::GetPrimaryRootWindow()->compositor()->device_scale_factor());
@@ -338,7 +311,7 @@ TEST_F(DisplayManagerTest, MAYBE_TestDeviceScaleOnlyChange) {
Shell::GetPrimaryRootWindow()->bounds().size().ToString());
}
-TEST_F(DisplayManagerTest, MAYBE_TestNativeDisplaysChanged) {
+TEST_F(DisplayManagerTest, TestNativeDisplaysChanged) {
const int64 internal_display_id =
display_manager()->SetFirstDisplayAsInternalDisplayForTest();
const gfx::Display native_display(internal_display_id,
@@ -402,18 +375,7 @@ TEST_F(DisplayManagerTest, MAYBE_TestNativeDisplaysChanged) {
FindDisplayForId(internal_display_id).bounds().ToString());
}
-#if defined(OS_CHROMEOS)
-#define MAYBE_EnsurePointerInDisplays EnsurePointerInDisplays
-#define MAYBE_EnsurePointerInDisplays_2ndOnLeft \
- EnsurePointerInDisplays_2ndOnLeft
-#else
-// TODO(oshima): Re-enable these tests on WinAura (http://crbug.com/158163).
-#define MAYBE_EnsurePointerInDisplays DISABLED_EnsurePointerInDisplays
-#define MAYBE_EnsurePointerInDisplays_2ndOnLeft \
- DISABLED_EnsurePointerInDisplays_2ndOnLeft
-#endif
-
-TEST_F(DisplayManagerTest, MAYBE_EnsurePointerInDisplays) {
+TEST_F(DisplayManagerTest, EnsurePointerInDisplays) {
UpdateDisplay("200x200,300x300");
Shell::RootWindowList root_windows = Shell::GetAllRootWindows();
@@ -451,7 +413,7 @@ TEST_F(DisplayManagerTest, MAYBE_EnsurePointerInDisplays) {
EXPECT_EQ("150,140", env->last_mouse_location().ToString());
}
-TEST_F(DisplayManagerTest, MAYBE_EnsurePointerInDisplays_2ndOnLeft) {
+TEST_F(DisplayManagerTest, EnsurePointerInDisplays_2ndOnLeft) {
UpdateDisplay("200x200,300x300");
Shell::RootWindowList root_windows = Shell::GetAllRootWindows();
@@ -486,7 +448,7 @@ TEST_F(DisplayManagerTest, MAYBE_EnsurePointerInDisplays_2ndOnLeft) {
EXPECT_EQ("150,150", env->last_mouse_location().ToString());
}
-TEST_F(DisplayManagerTest, MAYBE_NativeDisplaysChangedAfterPrimaryChange) {
+TEST_F(DisplayManagerTest, NativeDisplaysChangedAfterPrimaryChange) {
const int64 internal_display_id =
display_manager()->SetFirstDisplayAsInternalDisplayForTest();
const gfx::Display native_display(internal_display_id,
« no previous file with comments | « ash/display/display_controller_unittest.cc ('k') | ash/extended_desktop_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698