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

Unified Diff: content/shell/renderer/test_runner/gamepad_controller.h

Issue 207323002: Gamepad API: add test support for gamepad events (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: content/shell/renderer/test_runner/gamepad_controller.h
diff --git a/content/shell/renderer/test_runner/gamepad_controller.h b/content/shell/renderer/test_runner/gamepad_controller.h
index 1bc050a04a4aba7dc1b1097f65e1cd118312b90e..f38fc32210f1785fc53ebb6df6374a16365dbf3e 100644
--- a/content/shell/renderer/test_runner/gamepad_controller.h
+++ b/content/shell/renderer/test_runner/gamepad_controller.h
@@ -30,7 +30,15 @@ class GamepadController : public base::SupportsWeakPtr<GamepadController> {
private:
friend class GamepadControllerBindings;
+ // TODO(b.kelemen): for historical reasons Connect just initializes the
+ // object. The 'gamepadconnected' event will be dispatched via
+ // DispatchConnected. Tests for connected events need to first connect(),
+ // then set the gamepad data and finally call dispatchConnected().
+ // We should consider renaming Connect to Init and DispatchConnected to
+ // Connect and at the same time updating all the gamepad tests.
void Connect(int index);
+ void DispatchConnected(int index);
+
void Disconnect(int index);
void SetId(int index, const std::string& src);
void SetButtonCount(int index, int buttons);

Powered by Google App Engine
This is Rietveld 408576698