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

Side by Side Diff: content/browser/renderer_host/input/synthetic_pointer_action_unittest.cc

Issue 2856423002: input: Change how synthesized events are dispatched in telemetry tests. (Closed)
Patch Set: . Created 3 years, 7 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/time/time.h" 6 #include "base/time/time.h"
7 #include "content/browser/renderer_host/input/synthetic_gesture.h" 7 #include "content/browser/renderer_host/input/synthetic_gesture.h"
8 #include "content/browser/renderer_host/input/synthetic_gesture_target.h" 8 #include "content/browser/renderer_host/input/synthetic_gesture_target.h"
9 #include "content/browser/renderer_host/input/synthetic_pointer_action.h" 9 #include "content/browser/renderer_host/input/synthetic_pointer_action.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 } 58 }
59 NOTREACHED() << "Invalid SyntheticPointerActionParams::PointerActionType."; 59 NOTREACHED() << "Invalid SyntheticPointerActionParams::PointerActionType.";
60 return WebInputEvent::kUndefined; 60 return WebInputEvent::kUndefined;
61 } 61 }
62 62
63 class MockSyntheticPointerActionTarget : public SyntheticGestureTarget { 63 class MockSyntheticPointerActionTarget : public SyntheticGestureTarget {
64 public: 64 public:
65 MockSyntheticPointerActionTarget() {} 65 MockSyntheticPointerActionTarget() {}
66 ~MockSyntheticPointerActionTarget() override {} 66 ~MockSyntheticPointerActionTarget() override {}
67 67
68 // SyntheticGestureTarget:
69 void SetNeedsFlush() override { NOTIMPLEMENTED(); }
70
71 base::TimeDelta PointerAssumedStoppedTime() const override { 68 base::TimeDelta PointerAssumedStoppedTime() const override {
72 NOTIMPLEMENTED(); 69 NOTIMPLEMENTED();
73 return base::TimeDelta(); 70 return base::TimeDelta();
74 } 71 }
75 72
76 float GetTouchSlopInDips() const override { 73 float GetTouchSlopInDips() const override {
77 NOTIMPLEMENTED(); 74 NOTIMPLEMENTED();
78 return 0.0f; 75 return 0.0f;
79 } 76 }
80 77
(...skipping 622 matching lines...) Expand 10 before | Expand all | Expand 10 after
703 ForwardSyntheticPointerAction(); 700 ForwardSyntheticPointerAction();
704 EXPECT_EQ(3, num_success_); 701 EXPECT_EQ(3, num_success_);
705 EXPECT_EQ(0, num_failure_); 702 EXPECT_EQ(0, num_failure_);
706 EXPECT_TRUE(pointer_pen_target->SyntheticMouseActionDispatchedCorrectly( 703 EXPECT_TRUE(pointer_pen_target->SyntheticMouseActionDispatchedCorrectly(
707 param3, 1, buttons, SyntheticGestureParams::PEN_INPUT)); 704 param3, 1, buttons, SyntheticGestureParams::PEN_INPUT));
708 } 705 }
709 706
710 } // namespace 707 } // namespace
711 708
712 } // namespace content 709 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698