| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/test_runner/WebTestProxy.h" | 5 #include "content/shell/renderer/test_runner/WebTestProxy.h" |
| 6 | 6 |
| 7 #include <cctype> | 7 #include <cctype> |
| 8 | 8 |
| 9 #include "content/shell/renderer/test_runner/EventSender.h" | 9 #include "content/shell/renderer/test_runner/EventSender.h" |
| 10 #include "content/shell/renderer/test_runner/MockColorChooser.h" | 10 #include "content/shell/renderer/test_runner/MockColorChooser.h" |
| 11 #include "content/shell/renderer/test_runner/MockWebSpeechInputController.h" | 11 #include "content/shell/renderer/test_runner/MockWebSpeechInputController.h" |
| 12 #include "content/shell/renderer/test_runner/MockWebSpeechRecognizer.h" | 12 #include "content/shell/renderer/test_runner/MockWebSpeechRecognizer.h" |
| 13 #include "content/shell/renderer/test_runner/SpellCheckClient.h" | 13 #include "content/shell/renderer/test_runner/SpellCheckClient.h" |
| 14 #include "content/shell/renderer/test_runner/TestCommon.h" | 14 #include "content/shell/renderer/test_runner/TestCommon.h" |
| 15 #include "content/shell/renderer/test_runner/TestInterfaces.h" | 15 #include "content/shell/renderer/test_runner/TestInterfaces.h" |
| 16 #include "content/shell/renderer/test_runner/TestPlugin.h" | 16 #include "content/shell/renderer/test_runner/TestPlugin.h" |
| 17 #include "content/shell/renderer/test_runner/TestRunner.h" | |
| 18 #include "content/shell/renderer/test_runner/WebTestDelegate.h" | 17 #include "content/shell/renderer/test_runner/WebTestDelegate.h" |
| 19 #include "content/shell/renderer/test_runner/WebTestInterfaces.h" | 18 #include "content/shell/renderer/test_runner/WebTestInterfaces.h" |
| 20 #include "content/shell/renderer/test_runner/WebTestRunner.h" | 19 #include "content/shell/renderer/test_runner/WebTestRunner.h" |
| 21 #include "content/shell/renderer/test_runner/WebUserMediaClientMock.h" | 20 #include "content/shell/renderer/test_runner/WebUserMediaClientMock.h" |
| 22 #include "content/shell/renderer/test_runner/accessibility_controller.h" | 21 #include "content/shell/renderer/test_runner/accessibility_controller.h" |
| 22 #include "content/shell/renderer/test_runner/test_runner.h" |
| 23 // FIXME: Including platform_canvas.h here is a layering violation. | 23 // FIXME: Including platform_canvas.h here is a layering violation. |
| 24 #include "skia/ext/platform_canvas.h" | 24 #include "skia/ext/platform_canvas.h" |
| 25 #include "third_party/WebKit/public/platform/WebCString.h" | 25 #include "third_party/WebKit/public/platform/WebCString.h" |
| 26 #include "third_party/WebKit/public/platform/WebURLError.h" | 26 #include "third_party/WebKit/public/platform/WebURLError.h" |
| 27 #include "third_party/WebKit/public/platform/WebURLRequest.h" | 27 #include "third_party/WebKit/public/platform/WebURLRequest.h" |
| 28 #include "third_party/WebKit/public/platform/WebURLResponse.h" | 28 #include "third_party/WebKit/public/platform/WebURLResponse.h" |
| 29 #include "third_party/WebKit/public/web/WebAXEnums.h" | 29 #include "third_party/WebKit/public/web/WebAXEnums.h" |
| 30 #include "third_party/WebKit/public/web/WebAXObject.h" | 30 #include "third_party/WebKit/public/web/WebAXObject.h" |
| 31 #include "third_party/WebKit/public/web/WebCachedURLRequest.h" | 31 #include "third_party/WebKit/public/web/WebCachedURLRequest.h" |
| 32 #include "third_party/WebKit/public/web/WebConsoleMessage.h" | 32 #include "third_party/WebKit/public/web/WebConsoleMessage.h" |
| (...skipping 677 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 710 m_paintRect = WebRect(0, 0, INT_MAX, INT_MAX); | 710 m_paintRect = WebRect(0, 0, INT_MAX, INT_MAX); |
| 711 } | 711 } |
| 712 | 712 |
| 713 void WebTestProxyBase::scheduleComposite() | 713 void WebTestProxyBase::scheduleComposite() |
| 714 { | 714 { |
| 715 invalidateAll(); | 715 invalidateAll(); |
| 716 } | 716 } |
| 717 | 717 |
| 718 void WebTestProxyBase::scheduleAnimation() | 718 void WebTestProxyBase::scheduleAnimation() |
| 719 { | 719 { |
| 720 if (!m_testInterfaces->testRunner()->testIsRunning()) | 720 if (!m_testInterfaces->testRunner()->TestIsRunning()) |
| 721 return; | 721 return; |
| 722 | 722 |
| 723 if (!m_animateScheduled) { | 723 if (!m_animateScheduled) { |
| 724 m_animateScheduled = true; | 724 m_animateScheduled = true; |
| 725 m_delegate->postDelayedTask(new HostMethodTask(this, &WebTestProxyBase::
animateNow), 1); | 725 m_delegate->postDelayedTask(new HostMethodTask(this, &WebTestProxyBase::
animateNow), 1); |
| 726 } | 726 } |
| 727 } | 727 } |
| 728 | 728 |
| 729 void WebTestProxyBase::animateNow() | 729 void WebTestProxyBase::animateNow() |
| 730 { | 730 { |
| (...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 969 #endif | 969 #endif |
| 970 } | 970 } |
| 971 | 971 |
| 972 WebSpeechRecognizer* WebTestProxyBase::speechRecognizer() | 972 WebSpeechRecognizer* WebTestProxyBase::speechRecognizer() |
| 973 { | 973 { |
| 974 return speechRecognizerMock(); | 974 return speechRecognizerMock(); |
| 975 } | 975 } |
| 976 | 976 |
| 977 bool WebTestProxyBase::requestPointerLock() | 977 bool WebTestProxyBase::requestPointerLock() |
| 978 { | 978 { |
| 979 return m_testInterfaces->testRunner()->requestPointerLock(); | 979 return m_testInterfaces->testRunner()->RequestPointerLock(); |
| 980 } | 980 } |
| 981 | 981 |
| 982 void WebTestProxyBase::requestPointerUnlock() | 982 void WebTestProxyBase::requestPointerUnlock() |
| 983 { | 983 { |
| 984 m_testInterfaces->testRunner()->requestPointerUnlock(); | 984 m_testInterfaces->testRunner()->RequestPointerUnlock(); |
| 985 } | 985 } |
| 986 | 986 |
| 987 bool WebTestProxyBase::isPointerLocked() | 987 bool WebTestProxyBase::isPointerLocked() |
| 988 { | 988 { |
| 989 return m_testInterfaces->testRunner()->isPointerLocked(); | 989 return m_testInterfaces->testRunner()->isPointerLocked(); |
| 990 } | 990 } |
| 991 | 991 |
| 992 void WebTestProxyBase::didFocus() | 992 void WebTestProxyBase::didFocus() |
| 993 { | 993 { |
| 994 m_delegate->setFocus(this, true); | 994 m_delegate->setFocus(this, true); |
| (...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1355 | 1355 |
| 1356 void WebTestProxyBase::resetInputMethod() | 1356 void WebTestProxyBase::resetInputMethod() |
| 1357 { | 1357 { |
| 1358 // If a composition text exists, then we need to let the browser process | 1358 // If a composition text exists, then we need to let the browser process |
| 1359 // to cancel the input method's ongoing composition session. | 1359 // to cancel the input method's ongoing composition session. |
| 1360 if (m_webWidget) | 1360 if (m_webWidget) |
| 1361 m_webWidget->confirmComposition(); | 1361 m_webWidget->confirmComposition(); |
| 1362 } | 1362 } |
| 1363 | 1363 |
| 1364 } | 1364 } |
| OLD | NEW |