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

Side by Side Diff: ash/touch/touch_observer_hud_unittest.cc

Issue 2095193002: clang-format all of //ash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « ash/touch/touch_observer_hud.cc ('k') | ash/touch/touch_transformer_controller.cc » ('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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/touch/touch_observer_hud.h" 5 #include "ash/touch/touch_observer_hud.h"
6 6
7 #include "ash/common/ash_switches.h" 7 #include "ash/common/ash_switches.h"
8 #include "ash/display/display_manager.h" 8 #include "ash/display/display_manager.h"
9 #include "ash/root_window_controller.h" 9 #include "ash/root_window_controller.h"
10 #include "ash/screen_util.h" 10 #include "ash/screen_util.h"
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 214
215 TouchHudTestBase::SetUp(); 215 TouchHudTestBase::SetUp();
216 } 216 }
217 217
218 void CheckInternalDisplay() { 218 void CheckInternalDisplay() {
219 EXPECT_NE(static_cast<TouchObserverHUD*>(NULL), GetInternalTouchHudDebug()); 219 EXPECT_NE(static_cast<TouchObserverHUD*>(NULL), GetInternalTouchHudDebug());
220 EXPECT_EQ(internal_display_id(), GetInternalTouchHudDebug()->display_id()); 220 EXPECT_EQ(internal_display_id(), GetInternalTouchHudDebug()->display_id());
221 EXPECT_EQ(GetInternalRootWindow(), 221 EXPECT_EQ(GetInternalRootWindow(),
222 GetRootWindowForTouchHud(GetInternalTouchHudDebug())); 222 GetRootWindowForTouchHud(GetInternalTouchHudDebug()));
223 EXPECT_EQ(GetInternalRootWindow(), 223 EXPECT_EQ(GetInternalRootWindow(),
224 GetWidgetForTouchHud(GetInternalTouchHudDebug())-> 224 GetWidgetForTouchHud(GetInternalTouchHudDebug())
225 GetNativeView()->GetRootWindow()); 225 ->GetNativeView()
226 ->GetRootWindow());
226 EXPECT_EQ(GetInternalDisplay().size(), 227 EXPECT_EQ(GetInternalDisplay().size(),
227 GetWidgetForTouchHud(GetInternalTouchHudDebug())-> 228 GetWidgetForTouchHud(GetInternalTouchHudDebug())
228 GetWindowBoundsInScreen().size()); 229 ->GetWindowBoundsInScreen()
230 .size());
229 } 231 }
230 232
231 void CheckExternalDisplay() { 233 void CheckExternalDisplay() {
232 EXPECT_NE(static_cast<TouchHudDebug*>(NULL), GetExternalTouchHudDebug()); 234 EXPECT_NE(static_cast<TouchHudDebug*>(NULL), GetExternalTouchHudDebug());
233 EXPECT_EQ(external_display_id(), GetExternalTouchHudDebug()->display_id()); 235 EXPECT_EQ(external_display_id(), GetExternalTouchHudDebug()->display_id());
234 EXPECT_EQ(GetExternalRootWindow(), 236 EXPECT_EQ(GetExternalRootWindow(),
235 GetRootWindowForTouchHud(GetExternalTouchHudDebug())); 237 GetRootWindowForTouchHud(GetExternalTouchHudDebug()));
236 EXPECT_EQ(GetExternalRootWindow(), 238 EXPECT_EQ(GetExternalRootWindow(),
237 GetWidgetForTouchHud(GetExternalTouchHudDebug())-> 239 GetWidgetForTouchHud(GetExternalTouchHudDebug())
238 GetNativeView()->GetRootWindow()); 240 ->GetNativeView()
241 ->GetRootWindow());
239 EXPECT_EQ(GetExternalDisplay().size(), 242 EXPECT_EQ(GetExternalDisplay().size(),
240 GetWidgetForTouchHud(GetExternalTouchHudDebug())-> 243 GetWidgetForTouchHud(GetExternalTouchHudDebug())
241 GetWindowBoundsInScreen().size()); 244 ->GetWindowBoundsInScreen()
245 .size());
242 } 246 }
243 247
244 private: 248 private:
245 TouchHudDebug* GetInternalTouchHudDebug() { 249 TouchHudDebug* GetInternalTouchHudDebug() {
246 return GetInternalRootController()->touch_hud_debug(); 250 return GetInternalRootController()->touch_hud_debug();
247 } 251 }
248 252
249 TouchHudDebug* GetExternalTouchHudDebug() { 253 TouchHudDebug* GetExternalTouchHudDebug() {
250 return GetExternalRootController()->touch_hud_debug(); 254 return GetExternalRootController()->touch_hud_debug();
251 } 255 }
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
608 612
609 SendTouchEventToInternalHud(ui::ET_TOUCH_PRESSED, gfx::Point(10, 10), 1); 613 SendTouchEventToInternalHud(ui::ET_TOUCH_PRESSED, gfx::Point(10, 10), 1);
610 EXPECT_EQ(1, GetInternalTouchPointsCount()); 614 EXPECT_EQ(1, GetInternalTouchPointsCount());
611 615
612 // Disabling projection touch HUD shoud remove it without crashing. 616 // Disabling projection touch HUD shoud remove it without crashing.
613 DisableTouchHudProjection(); 617 DisableTouchHudProjection();
614 EXPECT_EQ(NULL, GetInternalTouchHudProjection()); 618 EXPECT_EQ(NULL, GetInternalTouchHudProjection());
615 } 619 }
616 620
617 } // namespace ash 621 } // namespace ash
OLDNEW
« no previous file with comments | « ash/touch/touch_observer_hud.cc ('k') | ash/touch/touch_transformer_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698