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

Side by Side Diff: chrome/browser/ui/views/first_run_bubble_unittest.cc

Issue 2786693002: Add PointerDetails to ui::MouseEvent's constructors (Closed)
Patch Set: mouse event constructor Created 3 years, 8 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
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 "chrome/browser/ui/views/first_run_bubble.h" 5 #include "chrome/browser/ui/views/first_run_bubble.h"
6 #include "base/macros.h" 6 #include "base/macros.h"
7 #include "chrome/browser/search_engines/template_url_service_factory.h" 7 #include "chrome/browser/search_engines/template_url_service_factory.h"
8 #include "chrome/test/base/testing_profile.h" 8 #include "chrome/test/base/testing_profile.h"
9 #include "components/search_engines/template_url.h" 9 #include "components/search_engines/template_url.h"
10 #include "components/search_engines/template_url_service.h" 10 #include "components/search_engines/template_url_service.h"
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 // dispatched to the anchor widget. 136 // dispatched to the anchor widget.
137 TEST_F(FirstRunBubbleTest, CloseBubbleOnKeyEvent) { 137 TEST_F(FirstRunBubbleTest, CloseBubbleOnKeyEvent) {
138 ui::KeyEvent key_event(ui::ET_KEY_PRESSED, ui::VKEY_ESCAPE, ui::EF_NONE); 138 ui::KeyEvent key_event(ui::ET_KEY_PRESSED, ui::VKEY_ESCAPE, ui::EF_NONE);
139 CreateAndCloseBubbleOnEventTest(&key_event); 139 CreateAndCloseBubbleOnEventTest(&key_event);
140 } 140 }
141 141
142 TEST_F(FirstRunBubbleTest, CloseBubbleOnMouseDownEvent) { 142 TEST_F(FirstRunBubbleTest, CloseBubbleOnMouseDownEvent) {
143 gfx::Point pt(110, 210); 143 gfx::Point pt(110, 210);
144 ui::MouseEvent mouse_down( 144 ui::MouseEvent mouse_down(
145 ui::ET_MOUSE_PRESSED, pt, pt, ui::EventTimeForNow(), 145 ui::ET_MOUSE_PRESSED, pt, pt, ui::EventTimeForNow(),
146 ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON); 146 ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON,
147 ui::PointerDetails(ui::EventPointerType::POINTER_TYPE_MOUSE));
147 CreateAndCloseBubbleOnEventTest(&mouse_down); 148 CreateAndCloseBubbleOnEventTest(&mouse_down);
148 } 149 }
149 150
150 TEST_F(FirstRunBubbleTest, CloseBubbleOnTouchDownEvent) { 151 TEST_F(FirstRunBubbleTest, CloseBubbleOnTouchDownEvent) {
151 ui::TouchEvent touch_down( 152 ui::TouchEvent touch_down(
152 ui::ET_TOUCH_PRESSED, gfx::Point(10, 10), ui::EventTimeForNow(), 153 ui::ET_TOUCH_PRESSED, gfx::Point(10, 10), ui::EventTimeForNow(),
153 ui::PointerDetails(ui::EventPointerType::POINTER_TYPE_TOUCH, 0)); 154 ui::PointerDetails(ui::EventPointerType::POINTER_TYPE_TOUCH, 0));
154 CreateAndCloseBubbleOnEventTest(&touch_down); 155 CreateAndCloseBubbleOnEventTest(&touch_down);
155 } 156 }
156 157
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698