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

Unified Diff: LayoutTests/gamepad/gamepad-events-basic.html

Issue 280393004: Update Gamepad.axes / GamepadButton.value to match the latest specification (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add back #ifdefs Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/TestExpectations ('k') | LayoutTests/gamepad/gamepad-events-basic-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/gamepad/gamepad-events-basic.html
diff --git a/LayoutTests/gamepad/gamepad-events-basic.html b/LayoutTests/gamepad/gamepad-events-basic.html
index d4fd3eb2923b80445b2f70da24738fb8020aafe6..869f991195522f17bd0ebeb3a7f9dae37fcf07ec 100644
--- a/LayoutTests/gamepad/gamepad-events-basic.html
+++ b/LayoutTests/gamepad/gamepad-events-basic.html
@@ -13,15 +13,18 @@
shouldBe("event.__proto__", "GamepadEvent.prototype");
shouldBe("event.__proto__.__proto__", "Event.prototype");
shouldBeEqualToString("event.gamepad.id", "MockStick 3000");
- shouldBe("event.gamepad.buttons.length", "2");
- shouldBe("event.gamepad.axes.length", "2");
+ shouldBe("event.gamepad.buttons.length", "3");
+ shouldBe("event.gamepad.axes.length", "3");
shouldBe("event.gamepad.buttons[0].value", "1.0");
shouldBeTrue("event.gamepad.buttons[0].pressed");
shouldBe("event.gamepad.buttons[1].value", "0.0");
shouldBeFalse("event.gamepad.buttons[1].pressed");
- shouldBe("event.gamepad.axes.length", "2");
+ shouldBe("event.gamepad.axes.length", "3");
+ shouldBe("event.gamepad.buttons[2].value", "0.333333");
+ shouldBeTrue("event.gamepad.buttons[2].pressed");
shouldBe("event.gamepad.axes[0]", "0.5");
shouldBe("event.gamepad.axes[1]", "-1.0");
+ shouldBe("event.gamepad.axes[2]", "0.333333");
gamepadController.disconnect(0);
}
@@ -30,8 +33,8 @@
shouldBe("event.__proto__", "GamepadEvent.prototype");
shouldBe("event.__proto__.__proto__", "Event.prototype");
shouldBeEqualToString("event.gamepad.id", "MockStick 3000");
- shouldBe("event.gamepad.buttons.length", "2");
- shouldBe("event.gamepad.axes.length", "2");
+ shouldBe("event.gamepad.buttons.length", "3");
+ shouldBe("event.gamepad.axes.length", "3");
finishJSTest();
}
@@ -40,12 +43,14 @@
gamepadController.connect(0);
gamepadController.setId(0, "MockStick 3000");
- gamepadController.setButtonCount(0, 2);
- gamepadController.setAxisCount(0, 2);
+ gamepadController.setButtonCount(0, 3);
+ gamepadController.setAxisCount(0, 3);
gamepadController.setButtonData(0, 0, 1);
gamepadController.setButtonData(0, 1, 0);
+ gamepadController.setButtonData(0, 2, 0.333333);
gamepadController.setAxisData(0, 0, .5);
gamepadController.setAxisData(0, 1, -1.0);
+ gamepadController.setAxisData(0, 2, 0.333333);
gamepadController.dispatchConnected(0);
}
else
« no previous file with comments | « LayoutTests/TestExpectations ('k') | LayoutTests/gamepad/gamepad-events-basic-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698