| OLD | NEW | 
|---|
| 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 "content/public/test/browser_test_utils.h" | 5 #include "content/public/test/browser_test_utils.h" | 
| 6 | 6 | 
| 7 #include <stddef.h> | 7 #include <stddef.h> | 
| 8 #include <tuple> | 8 #include <tuple> | 
| 9 #include <utility> | 9 #include <utility> | 
| 10 | 10 | 
| (...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 579   tap.x = point.x(); | 579   tap.x = point.x(); | 
| 580   tap.y = point.y(); | 580   tap.y = point.y(); | 
| 581   tap.modifiers = modifiers; | 581   tap.modifiers = modifiers; | 
| 582   RenderWidgetHostImpl* widget_host = RenderWidgetHostImpl::From( | 582   RenderWidgetHostImpl* widget_host = RenderWidgetHostImpl::From( | 
| 583       web_contents->GetRenderViewHost()->GetWidget()); | 583       web_contents->GetRenderViewHost()->GetWidget()); | 
| 584   widget_host->ForwardGestureEvent(tap); | 584   widget_host->ForwardGestureEvent(tap); | 
| 585 } | 585 } | 
| 586 | 586 | 
| 587 #if defined(USE_AURA) | 587 #if defined(USE_AURA) | 
| 588 void SimulateTouchPressAt(WebContents* web_contents, const gfx::Point& point) { | 588 void SimulateTouchPressAt(WebContents* web_contents, const gfx::Point& point) { | 
| 589   ui::TouchEvent touch(ui::ET_TOUCH_PRESSED, point, 0, base::TimeDelta()); | 589   ui::TouchEvent touch(ui::ET_TOUCH_PRESSED, point, 0, base::TimeTicks()); | 
| 590   static_cast<RenderWidgetHostViewAura*>( | 590   static_cast<RenderWidgetHostViewAura*>( | 
| 591       web_contents->GetRenderWidgetHostView()) | 591       web_contents->GetRenderWidgetHostView()) | 
| 592       ->OnTouchEvent(&touch); | 592       ->OnTouchEvent(&touch); | 
| 593 } | 593 } | 
| 594 #endif | 594 #endif | 
| 595 | 595 | 
| 596 void SimulateKeyPress(WebContents* web_contents, | 596 void SimulateKeyPress(WebContents* web_contents, | 
| 597                       ui::DomKey key, | 597                       ui::DomKey key, | 
| 598                       ui::DomCode code, | 598                       ui::DomCode code, | 
| 599                       ui::KeyboardCode key_code, | 599                       ui::KeyboardCode key_code, | 
| (...skipping 674 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1274   DCHECK_CURRENTLY_ON(BrowserThread::UI); | 1274   DCHECK_CURRENTLY_ON(BrowserThread::UI); | 
| 1275   if (ack_result_ != INPUT_EVENT_ACK_STATE_UNKNOWN) | 1275   if (ack_result_ != INPUT_EVENT_ACK_STATE_UNKNOWN) | 
| 1276     return ack_result_; | 1276     return ack_result_; | 
| 1277   base::RunLoop run_loop; | 1277   base::RunLoop run_loop; | 
| 1278   base::AutoReset<base::Closure> reset_quit(&quit_, run_loop.QuitClosure()); | 1278   base::AutoReset<base::Closure> reset_quit(&quit_, run_loop.QuitClosure()); | 
| 1279   run_loop.Run(); | 1279   run_loop.Run(); | 
| 1280   return ack_result_; | 1280   return ack_result_; | 
| 1281 } | 1281 } | 
| 1282 | 1282 | 
| 1283 }  // namespace content | 1283 }  // namespace content | 
| OLD | NEW | 
|---|