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

Side by Side Diff: ash/tooltips/tooltip_controller_unittest.cc

Issue 16539005: Skip mulitple-dispay tests on win8 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase again, and comment Created 7 years, 6 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
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/display_controller.h" 5 #include "ash/display/display_controller.h"
6 #include "ash/shell.h" 6 #include "ash/shell.h"
7 #include "ash/test/ash_test_base.h" 7 #include "ash/test/ash_test_base.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "ui/aura/client/tooltip_client.h" 9 #include "ui/aura/client/tooltip_client.h"
10 #include "ui/aura/env.h" 10 #include "ui/aura/env.h"
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 ash::Shell::GetInstance()->cursor_manager()->DisableMouseEvents(); 125 ash::Shell::GetInstance()->cursor_manager()->DisableMouseEvents();
126 helper_->FireTooltipTimer(); 126 helper_->FireTooltipTimer();
127 EXPECT_FALSE(helper_->IsTooltipVisible()); 127 EXPECT_FALSE(helper_->IsTooltipVisible());
128 128
129 // Show the cursor and re-check. 129 // Show the cursor and re-check.
130 ash::Shell::GetInstance()->cursor_manager()->EnableMouseEvents(); 130 ash::Shell::GetInstance()->cursor_manager()->EnableMouseEvents();
131 helper_->FireTooltipTimer(); 131 helper_->FireTooltipTimer();
132 EXPECT_TRUE(helper_->IsTooltipVisible()); 132 EXPECT_TRUE(helper_->IsTooltipVisible());
133 } 133 }
134 134
135 #if defined(OS_WIN) 135 TEST_F(TooltipControllerTest, TooltipsOnMultiDisplayShouldNotCrash) {
136 // Multiple displays are not supported on Windows Ash. http://crbug.com/165962 136 RETURN_IF_WIN8;
137 #define MAYBE_TooltipsOnMultiDisplayShouldNotCrash \
138 DISABLED_TooltipsOnMultiDisplayShouldNotCrash
139 #else
140 #define MAYBE_TooltipsOnMultiDisplayShouldNotCrash \
141 TooltipsOnMultiDisplayShouldNotCrash
142 #endif
143 137
144 TEST_F(TooltipControllerTest, MAYBE_TooltipsOnMultiDisplayShouldNotCrash) {
145 UpdateDisplay("1000x600,600x400"); 138 UpdateDisplay("1000x600,600x400");
146 Shell::RootWindowList root_windows = Shell::GetAllRootWindows(); 139 Shell::RootWindowList root_windows = Shell::GetAllRootWindows();
147 scoped_ptr<views::Widget> widget1(CreateNewWidgetWithBoundsOn( 140 scoped_ptr<views::Widget> widget1(CreateNewWidgetWithBoundsOn(
148 0, gfx::Rect(10, 10, 100, 100))); 141 0, gfx::Rect(10, 10, 100, 100)));
149 TooltipTestView* view1 = new TooltipTestView; 142 TooltipTestView* view1 = new TooltipTestView;
150 AddViewToWidgetAndResize(widget1.get(), view1); 143 AddViewToWidgetAndResize(widget1.get(), view1);
151 view1->set_tooltip_text(ASCIIToUTF16("Tooltip Text for view 1")); 144 view1->set_tooltip_text(ASCIIToUTF16("Tooltip Text for view 1"));
152 EXPECT_EQ(widget1->GetNativeView()->GetRootWindow(), root_windows[0]); 145 EXPECT_EQ(widget1->GetNativeView()->GetRootWindow(), root_windows[0]);
153 146
154 scoped_ptr<views::Widget> widget2(CreateNewWidgetWithBoundsOn( 147 scoped_ptr<views::Widget> widget2(CreateNewWidgetWithBoundsOn(
(...skipping 25 matching lines...) Expand all
180 // be able to show tooltips on the primary display. 173 // be able to show tooltips on the primary display.
181 aura::test::EventGenerator generator1(root_windows[0]); 174 aura::test::EventGenerator generator1(root_windows[0]);
182 generator1.MoveMouseRelativeTo(widget1->GetNativeView(), 175 generator1.MoveMouseRelativeTo(widget1->GetNativeView(),
183 view1->bounds().CenterPoint()); 176 view1->bounds().CenterPoint());
184 helper_->FireTooltipTimer(); 177 helper_->FireTooltipTimer();
185 EXPECT_TRUE(helper_->IsTooltipVisible()); 178 EXPECT_TRUE(helper_->IsTooltipVisible());
186 } 179 }
187 180
188 } // namespace test 181 } // namespace test
189 } // namespace ash 182 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698