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

Unified Diff: content/browser/renderer_host/pepper/pepper_gamepad_host_unittest.cc

Issue 165983005: Updating Gamepad API to match latest spec (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed typo in GamepadProviderTest Created 6 years, 10 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 | « content/browser/gamepad/gamepad_standard_mappings_win.cc ('k') | content/common/gamepad_user_gesture.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/pepper/pepper_gamepad_host_unittest.cc
diff --git a/content/browser/renderer_host/pepper/pepper_gamepad_host_unittest.cc b/content/browser/renderer_host/pepper/pepper_gamepad_host_unittest.cc
index 43ff1170354d20caad73bdd4099799370fe675f5..f7cd51eeaf0ec2790f5004c7cdcbe7afcd5357cd 100644
--- a/content/browser/renderer_host/pepper/pepper_gamepad_host_unittest.cc
+++ b/content/browser/renderer_host/pepper/pepper_gamepad_host_unittest.cc
@@ -164,7 +164,8 @@ TEST_F(PepperGamepadHostTest, WaitForReply) {
// ensures that it was able to issue callbacks for the first read (if it
// issued one) before we try to check for it.
blink::WebGamepads button_down_data = default_data;
- button_down_data.items[0].buttons[0] = 1.f;
+ button_down_data.items[0].buttons[0].value = 1.f;
+ button_down_data.items[0].buttons[0].pressed = true;
fetcher->SetTestData(button_down_data);
fetcher->WaitForDataRead();
fetcher->WaitForDataRead();
@@ -190,8 +191,10 @@ TEST_F(PepperGamepadHostTest, WaitForReply) {
EXPECT_EQ(button_down_data.items[0].buttonsLength,
buffer->buffer.items[0].buttons_length);
for (size_t i = 0; i < ppapi::WebKitGamepad::kButtonsLengthCap; i++) {
- EXPECT_EQ(button_down_data.items[0].buttons[i],
- buffer->buffer.items[0].buttons[i]);
+ EXPECT_EQ(button_down_data.items[0].buttons[i].value,
+ buffer->buffer.items[0].buttons[i].value);
+ EXPECT_EQ(button_down_data.items[0].buttons[i].pressed,
+ buffer->buffer.items[0].buttons[i].pressed);
}
// Duplicate requests should be denied.
« no previous file with comments | « content/browser/gamepad/gamepad_standard_mappings_win.cc ('k') | content/common/gamepad_user_gesture.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698