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

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

Issue 339913002: Move MockScreenOrientationController to content/shell/renderer/test_runner/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
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 15 matching lines...) Expand all
26 #include "content/public/renderer/render_view_visitor.h" 26 #include "content/public/renderer/render_view_visitor.h"
27 #include "content/public/test/layouttest_support.h" 27 #include "content/public/test/layouttest_support.h"
28 #include "content/shell/common/shell_messages.h" 28 #include "content/shell/common/shell_messages.h"
29 #include "content/shell/common/shell_switches.h" 29 #include "content/shell/common/shell_switches.h"
30 #include "content/shell/common/webkit_test_helpers.h" 30 #include "content/shell/common/webkit_test_helpers.h"
31 #include "content/shell/renderer/gc_controller.h" 31 #include "content/shell/renderer/gc_controller.h"
32 #include "content/shell/renderer/leak_detector.h" 32 #include "content/shell/renderer/leak_detector.h"
33 #include "content/shell/renderer/shell_render_process_observer.h" 33 #include "content/shell/renderer/shell_render_process_observer.h"
34 #include "content/shell/renderer/test_runner/WebTask.h" 34 #include "content/shell/renderer/test_runner/WebTask.h"
35 #include "content/shell/renderer/test_runner/WebTestInterfaces.h" 35 #include "content/shell/renderer/test_runner/WebTestInterfaces.h"
36 #include "content/shell/renderer/test_runner/mock_screen_orientation_controller. h"
36 #include "content/shell/renderer/test_runner/web_test_proxy.h" 37 #include "content/shell/renderer/test_runner/web_test_proxy.h"
37 #include "content/shell/renderer/test_runner/web_test_runner.h" 38 #include "content/shell/renderer/test_runner/web_test_runner.h"
38 #include "net/base/filename_util.h" 39 #include "net/base/filename_util.h"
39 #include "net/base/net_errors.h" 40 #include "net/base/net_errors.h"
40 #include "skia/ext/platform_canvas.h" 41 #include "skia/ext/platform_canvas.h"
41 #include "third_party/WebKit/public/platform/Platform.h" 42 #include "third_party/WebKit/public/platform/Platform.h"
42 #include "third_party/WebKit/public/platform/WebCString.h" 43 #include "third_party/WebKit/public/platform/WebCString.h"
43 #include "third_party/WebKit/public/platform/WebPoint.h" 44 #include "third_party/WebKit/public/platform/WebPoint.h"
44 #include "third_party/WebKit/public/platform/WebRect.h" 45 #include "third_party/WebKit/public/platform/WebRect.h"
45 #include "third_party/WebKit/public/platform/WebSize.h" 46 #include "third_party/WebKit/public/platform/WebSize.h"
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 SetMockDeviceMotionData(data); 222 SetMockDeviceMotionData(data);
222 } 223 }
223 224
224 void WebKitTestRunner::setDeviceOrientationData( 225 void WebKitTestRunner::setDeviceOrientationData(
225 const WebDeviceOrientationData& data) { 226 const WebDeviceOrientationData& data) {
226 SetMockDeviceOrientationData(data); 227 SetMockDeviceOrientationData(data);
227 } 228 }
228 229
229 void WebKitTestRunner::setScreenOrientation( 230 void WebKitTestRunner::setScreenOrientation(
230 const WebScreenOrientationType& orientation) { 231 const WebScreenOrientationType& orientation) {
231 SetMockScreenOrientation(render_view(), orientation); 232 MockScreenOrientationController* mock_controller =
233 proxy()->GetScreenOrientationClientMock();
234 mock_controller->UpdateDeviceOrientation(render_view(), orientation);
232 } 235 }
233 236
234 void WebKitTestRunner::resetScreenOrientation() { 237 void WebKitTestRunner::resetScreenOrientation() {
235 ResetMockScreenOrientation(); 238 MockScreenOrientationController* mock_controller =
239 proxy()->GetScreenOrientationClientMock();
240 mock_controller->ResetData();
236 } 241 }
237 242
238 void WebKitTestRunner::didChangeBatteryStatus( 243 void WebKitTestRunner::didChangeBatteryStatus(
239 const blink::WebBatteryStatus& status) { 244 const blink::WebBatteryStatus& status) {
240 MockBatteryStatusChanged(status); 245 MockBatteryStatusChanged(status);
241 } 246 }
242 247
243 void WebKitTestRunner::printMessage(const std::string& message) { 248 void WebKitTestRunner::printMessage(const std::string& message) {
244 Send(new ShellViewHostMsg_PrintMessage(routing_id(), message)); 249 Send(new ShellViewHostMsg_PrintMessage(routing_id(), message));
245 } 250 }
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after
723 728
724 leak_detector_->TryLeakDetection(main_frame); 729 leak_detector_->TryLeakDetection(main_frame);
725 } 730 }
726 731
727 void WebKitTestRunner::ReportLeakDetectionResult( 732 void WebKitTestRunner::ReportLeakDetectionResult(
728 const LeakDetectionResult& report) { 733 const LeakDetectionResult& report) {
729 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); 734 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report));
730 } 735 }
731 736
732 } // namespace content 737 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698