OLD | NEW |
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 <string.h> | 5 #include <string.h> |
6 | 6 |
7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
8 #include "base/memory/weak_ptr.h" | 8 #include "base/memory/weak_ptr.h" |
9 #include "content/browser/gamepad/gamepad_test_helpers.h" | 9 #include "content/browser/gamepad/gamepad_test_helpers.h" |
10 #include "content/browser/renderer_host/pepper/browser_ppapi_host_test.h" | 10 #include "content/browser/renderer_host/pepper/browser_ppapi_host_test.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 namespace content { | 21 namespace content { |
22 | 22 |
23 namespace { | 23 namespace { |
24 | 24 |
25 class PepperGamepadHostTest | 25 class PepperGamepadHostTest |
26 : public testing::Test, | 26 : public testing::Test, |
27 public BrowserPpapiHostTest { | 27 public BrowserPpapiHostTest { |
28 public: | 28 public: |
29 PepperGamepadHostTest() { | 29 PepperGamepadHostTest() { |
30 } | 30 } |
31 ~PepperGamepadHostTest() { | 31 virtual ~PepperGamepadHostTest() { |
32 } | 32 } |
33 | 33 |
34 void ConstructService(const WebKit::WebGamepads& test_data) { | 34 void ConstructService(const WebKit::WebGamepads& test_data) { |
35 service_.reset(new GamepadServiceTestConstructor(test_data)); | 35 service_.reset(new GamepadServiceTestConstructor(test_data)); |
36 } | 36 } |
37 | 37 |
38 GamepadService* gamepad_service() { return service_->gamepad_service(); } | 38 GamepadService* gamepad_service() { return service_->gamepad_service(); } |
39 | 39 |
40 protected: | 40 protected: |
41 scoped_ptr<GamepadServiceTestConstructor> service_; | 41 scoped_ptr<GamepadServiceTestConstructor> service_; |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 } | 195 } |
196 | 196 |
197 // Duplicate requests should be denied. | 197 // Duplicate requests should be denied. |
198 EXPECT_EQ(PP_ERROR_FAILED, | 198 EXPECT_EQ(PP_ERROR_FAILED, |
199 gamepad_host.OnResourceMessageReceived( | 199 gamepad_host.OnResourceMessageReceived( |
200 PpapiHostMsg_Gamepad_RequestMemory(), | 200 PpapiHostMsg_Gamepad_RequestMemory(), |
201 &context)); | 201 &context)); |
202 } | 202 } |
203 | 203 |
204 } // namespace content | 204 } // namespace content |
OLD | NEW |