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

Side by Side Diff: content/shell/renderer/webkit_test_runner.cc

Issue 207323002: Gamepad API: add test support for gamepad events (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 9 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
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/shell/renderer/webkit_test_runner.h" 5 #include "content/shell/renderer/webkit_test_runner.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <clocale> 8 #include <clocale>
9 #include <cmath> 9 #include <cmath>
10 10
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 229
230 void WebKitTestRunner::setEditCommand(const std::string& name, 230 void WebKitTestRunner::setEditCommand(const std::string& name,
231 const std::string& value) { 231 const std::string& value) {
232 render_view()->SetEditCommandForNextKeyEvent(name, value); 232 render_view()->SetEditCommandForNextKeyEvent(name, value);
233 } 233 }
234 234
235 void WebKitTestRunner::setGamepadData(const WebGamepads& gamepads) { 235 void WebKitTestRunner::setGamepadData(const WebGamepads& gamepads) {
236 SetMockGamepads(gamepads); 236 SetMockGamepads(gamepads);
237 } 237 }
238 238
239 void WebKitTestRunner::didConnectGamepad(
240 int index,
241 const blink::WebGamepad& gamepad) {
242 MockGamepadConnected(index, gamepad);
243 }
244
245 void WebKitTestRunner::didDisconnectGamepad(
246 int index,
247 const blink::WebGamepad& gamepad) {
248 MockGamepadDisconnected(index, gamepad);
249 }
250
239 void WebKitTestRunner::setDeviceMotionData(const WebDeviceMotionData& data) { 251 void WebKitTestRunner::setDeviceMotionData(const WebDeviceMotionData& data) {
240 SetMockDeviceMotionData(data); 252 SetMockDeviceMotionData(data);
241 } 253 }
242 254
243 void WebKitTestRunner::setDeviceOrientationData( 255 void WebKitTestRunner::setDeviceOrientationData(
244 const WebDeviceOrientationData& data) { 256 const WebDeviceOrientationData& data) {
245 SetMockDeviceOrientationData(data); 257 SetMockDeviceOrientationData(data);
246 } 258 }
247 259
248 void WebKitTestRunner::setScreenOrientation( 260 void WebKitTestRunner::setScreenOrientation(
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after
726 WebFrame* main_frame = render_view()->GetWebView()->mainFrame(); 738 WebFrame* main_frame = render_view()->GetWebView()->mainFrame();
727 DCHECK_EQ(GURL(kAboutBlankURL), GURL(main_frame->document().url())); 739 DCHECK_EQ(GURL(kAboutBlankURL), GURL(main_frame->document().url()));
728 DCHECK(!main_frame->isLoading()); 740 DCHECK(!main_frame->isLoading());
729 741
730 LeakDetectionResult result = leak_detector_->TryLeakDetection( 742 LeakDetectionResult result = leak_detector_->TryLeakDetection(
731 render_view()->GetWebView()->mainFrame()); 743 render_view()->GetWebView()->mainFrame());
732 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), result)); 744 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), result));
733 } 745 }
734 746
735 } // namespace content 747 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698