OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 15 matching lines...) Expand all Loading... |
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 */ | 29 */ |
30 | 30 |
31 #include "config.h" | 31 #include "config.h" |
32 #include "WebTestProxy.h" | 32 #include "WebTestProxy.h" |
33 | 33 |
34 #include "AccessibilityControllerChromium.h" | 34 #include "AccessibilityControllerChromium.h" |
35 #include "EventSender.h" | 35 #include "EventSender.h" |
| 36 #include "MockWebDeviceMotionHandler.h" |
36 #include "MockWebSpeechInputController.h" | 37 #include "MockWebSpeechInputController.h" |
37 #include "MockWebSpeechRecognizer.h" | 38 #include "MockWebSpeechRecognizer.h" |
38 #include "SpellCheckClient.h" | 39 #include "SpellCheckClient.h" |
39 #include "TestCommon.h" | 40 #include "TestCommon.h" |
40 #include "TestInterfaces.h" | 41 #include "TestInterfaces.h" |
41 #include "TestPlugin.h" | 42 #include "TestPlugin.h" |
42 #include "TestRunner.h" | 43 #include "TestRunner.h" |
43 #include "WebAccessibilityNotification.h" | 44 #include "WebAccessibilityNotification.h" |
44 #include "WebAccessibilityObject.h" | 45 #include "WebAccessibilityObject.h" |
45 #include "WebCachedURLRequest.h" | 46 #include "WebCachedURLRequest.h" |
(...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
679 return m_geolocationClient.get(); | 680 return m_geolocationClient.get(); |
680 } | 681 } |
681 | 682 |
682 WebDeviceOrientationClientMock* WebTestProxyBase::deviceOrientationClientMock() | 683 WebDeviceOrientationClientMock* WebTestProxyBase::deviceOrientationClientMock() |
683 { | 684 { |
684 if (!m_deviceOrientationClient.get()) | 685 if (!m_deviceOrientationClient.get()) |
685 m_deviceOrientationClient.reset(WebDeviceOrientationClientMock::create()
); | 686 m_deviceOrientationClient.reset(WebDeviceOrientationClientMock::create()
); |
686 return m_deviceOrientationClient.get(); | 687 return m_deviceOrientationClient.get(); |
687 } | 688 } |
688 | 689 |
| 690 MockWebDeviceMotionHandler* WebTestProxyBase::deviceMotionHandlerMock() |
| 691 { |
| 692 if (!m_deviceMotionHandler.get()) |
| 693 m_deviceMotionHandler.reset(new MockWebDeviceMotionHandler()); |
| 694 return m_deviceMotionHandler.get(); |
| 695 } |
| 696 |
689 #if ENABLE_INPUT_SPEECH | 697 #if ENABLE_INPUT_SPEECH |
690 MockWebSpeechInputController* WebTestProxyBase::speechInputControllerMock() | 698 MockWebSpeechInputController* WebTestProxyBase::speechInputControllerMock() |
691 { | 699 { |
692 WEBKIT_ASSERT(m_speechInputController.get()); | 700 WEBKIT_ASSERT(m_speechInputController.get()); |
693 return m_speechInputController.get(); | 701 return m_speechInputController.get(); |
694 } | 702 } |
695 #endif | 703 #endif |
696 | 704 |
697 MockWebSpeechRecognizer* WebTestProxyBase::speechRecognizerMock() | 705 MockWebSpeechRecognizer* WebTestProxyBase::speechRecognizerMock() |
698 { | 706 { |
(...skipping 784 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1483 { | 1491 { |
1484 if (m_testInterfaces->testRunner()->shouldInterceptPostMessage()) { | 1492 if (m_testInterfaces->testRunner()->shouldInterceptPostMessage()) { |
1485 m_delegate->printMessage("intercepted postMessage\n"); | 1493 m_delegate->printMessage("intercepted postMessage\n"); |
1486 return true; | 1494 return true; |
1487 } | 1495 } |
1488 | 1496 |
1489 return false; | 1497 return false; |
1490 } | 1498 } |
1491 | 1499 |
1492 } | 1500 } |
OLD | NEW |