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

Side by Side Diff: content/browser/renderer_host/pepper/pepper_gamepad_host_unittest.cc

Issue 2611823003: ABANDONED CL: Changes to compile and pass tests after Big Blink Rename (excluding functions). (Closed)
Patch Set: Inducing merge conflicts to force human review and changes after rename. Created 3 years, 11 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/core/v8/V8V0CustomElementLifecycleCallbacks.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/browser/renderer_host/pepper/pepper_gamepad_host.h" 5 #include "content/browser/renderer_host/pepper/pepper_gamepad_host.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <string.h> 8 #include <string.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 ppapi::WebKitGamepads ppapi_gamepads; 77 ppapi::WebKitGamepads ppapi_gamepads;
78 blink::WebGamepads web_gamepads; 78 blink::WebGamepads web_gamepads;
79 EXPECT_EQ(AddressDiff(&web_gamepads.length, &web_gamepads), 79 EXPECT_EQ(AddressDiff(&web_gamepads.length, &web_gamepads),
80 AddressDiff(&ppapi_gamepads.length, &ppapi_gamepads)); 80 AddressDiff(&ppapi_gamepads.length, &ppapi_gamepads));
81 81
82 // See comment below on storage & the EXPECT macro. 82 // See comment below on storage & the EXPECT macro.
83 size_t webkit_items_length_cap = blink::WebGamepads::itemsLengthCap; 83 size_t webkit_items_length_cap = blink::WebGamepads::itemsLengthCap;
84 size_t ppapi_items_length_cap = ppapi::WebKitGamepads::kItemsLengthCap; 84 size_t ppapi_items_length_cap = ppapi::WebKitGamepads::kItemsLengthCap;
85 EXPECT_EQ(webkit_items_length_cap, ppapi_items_length_cap); 85 EXPECT_EQ(webkit_items_length_cap, ppapi_items_length_cap);
86 86
87 for (size_t i = 0; i < web_gamepads.itemsLengthCap; i++) { 87 for (size_t i = 0; i < webkit_items_length_cap; i++) {
88 EXPECT_EQ(AddressDiff(&web_gamepads.items[0], &web_gamepads), 88 EXPECT_EQ(AddressDiff(&web_gamepads.items[0], &web_gamepads),
89 AddressDiff(&ppapi_gamepads.items[0], &ppapi_gamepads)); 89 AddressDiff(&ppapi_gamepads.items[0], &ppapi_gamepads));
90 } 90 }
91 } 91 }
92 92
93 TEST_F(PepperGamepadHostTest, ValidateGamepadMatch) { 93 TEST_F(PepperGamepadHostTest, ValidateGamepadMatch) {
94 // Gamepad. 94 // Gamepad.
95 static_assert(sizeof(ppapi::WebKitGamepad) == sizeof(blink::WebGamepad), 95 static_assert(sizeof(ppapi::WebKitGamepad) == sizeof(blink::WebGamepad),
96 "gamepad data must match"); 96 "gamepad data must match");
97 ppapi::WebKitGamepad ppapi_gamepad; 97 ppapi::WebKitGamepad ppapi_gamepad;
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 buffer->buffer.items[0].buttons[i].pressed); 195 buffer->buffer.items[0].buttons[i].pressed);
196 } 196 }
197 197
198 // Duplicate requests should be denied. 198 // Duplicate requests should be denied.
199 EXPECT_EQ(PP_ERROR_FAILED, 199 EXPECT_EQ(PP_ERROR_FAILED,
200 gamepad_host.OnResourceMessageReceived( 200 gamepad_host.OnResourceMessageReceived(
201 PpapiHostMsg_Gamepad_RequestMemory(), &context)); 201 PpapiHostMsg_Gamepad_RequestMemory(), &context));
202 } 202 }
203 203
204 } // namespace content 204 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/core/v8/V8V0CustomElementLifecycleCallbacks.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698