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

Unified Diff: LayoutTests/gamepad/gamepad-api.html

Issue 806993002: Removed deprecated navigator.webkitGetGamepads. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Missed one layout test expectations update Created 6 years 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: LayoutTests/gamepad/gamepad-api.html
diff --git a/LayoutTests/gamepad/gamepad-api.html b/LayoutTests/gamepad/gamepad-api.html
index 30a082d381ad97829aea12db104aa9820a1215a9..5eb03436ecf700499854495db67ca2034cc29b42 100644
--- a/LayoutTests/gamepad/gamepad-api.html
+++ b/LayoutTests/gamepad/gamepad-api.html
@@ -4,16 +4,9 @@
<script>
description("Validates the exposed Gamepad API.")
- shouldBeDefined("navigator.webkitGetGamepads");
shouldBeDefined("navigator.getGamepads");
shouldBeDefined("GamepadEvent");
- webkitGamepads = navigator.webkitGetGamepads();
- shouldBe("webkitGamepads.length", "4");
- shouldBeUndefined("webkitGamepads[0]");
- shouldBe("webkitGamepads.item.__proto__", "Function.prototype")
- shouldBeNull("webkitGamepads.item(0)");
-
gamepads = navigator.getGamepads();
shouldBe("gamepads.length", "4");
shouldBeUndefined("gamepads[0]");
@@ -27,37 +20,20 @@
gamepadController.setButtonCount(0, 1);
gamepadController.setAxisCount(0, 1);
- function checkProperties(isPrefixed) {
- shouldBe("gamepad.id.__proto__", "String.prototype");
- shouldBe("gamepad.connected.__proto__", "Boolean.prototype");
- shouldBe("gamepad.index.__proto__", "Number.prototype");
- shouldBe("gamepad.timestamp.__proto__", "Number.prototype");
- shouldBe("gamepad.axes.__proto__", "Array.prototype");
- shouldBe("gamepad.axes[0].__proto__", "Number.prototype");
-
- shouldBe("gamepad.buttons.__proto__", "Array.prototype");
- if (isPrefixed) {
- shouldBe("gamepad.buttons[0].__proto__", "Number.prototype");
- } else {
- shouldBe("gamepad.buttons[0].pressed.__proto__", "Boolean.prototype");
- shouldBe("gamepad.buttons[0].value.__proto__", "Number.prototype");
- }
-
- if (!isPrefixed)
- shouldBe("gamepad.mapping.__proto__", "String.prototype");
- }
-
- gamepad = navigator.webkitGetGamepads()[0];
- shouldBeNonNull("gamepad");
- shouldBeTrue("gamepad.connected");
- shouldBe("gamepad.__proto__", "WebKitGamepad.prototype");
- checkProperties(true);
-
gamepad = navigator.getGamepads()[0];
shouldBeNonNull("gamepad");
shouldBeTrue("gamepad.connected");
shouldBe("gamepad.__proto__", "Gamepad.prototype");
- checkProperties(false);
+ shouldBe("gamepad.id.__proto__", "String.prototype");
+ shouldBe("gamepad.connected.__proto__", "Boolean.prototype");
+ shouldBe("gamepad.index.__proto__", "Number.prototype");
+ shouldBe("gamepad.timestamp.__proto__", "Number.prototype");
+ shouldBe("gamepad.axes.__proto__", "Array.prototype");
+ shouldBe("gamepad.axes[0].__proto__", "Number.prototype");
+ shouldBe("gamepad.buttons.__proto__", "Array.prototype");
+ shouldBe("gamepad.buttons[0].pressed.__proto__", "Boolean.prototype");
+ shouldBe("gamepad.buttons[0].value.__proto__", "Number.prototype");
+ shouldBe("gamepad.mapping.__proto__", "String.prototype");
}
else
{

Powered by Google App Engine
This is Rietveld 408576698