| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 #include "TestPlugin.h" | 42 #include "TestPlugin.h" |
| 43 #include "TestRunner.h" | 43 #include "TestRunner.h" |
| 44 #include "WebUserMediaClientMock.h" | 44 #include "WebUserMediaClientMock.h" |
| 45 #include "public/platform/WebCString.h" | 45 #include "public/platform/WebCString.h" |
| 46 #include "public/platform/WebURLError.h" | 46 #include "public/platform/WebURLError.h" |
| 47 #include "public/platform/WebURLRequest.h" | 47 #include "public/platform/WebURLRequest.h" |
| 48 #include "public/platform/WebURLResponse.h" | 48 #include "public/platform/WebURLResponse.h" |
| 49 #include "public/testing/WebTestDelegate.h" | 49 #include "public/testing/WebTestDelegate.h" |
| 50 #include "public/testing/WebTestInterfaces.h" | 50 #include "public/testing/WebTestInterfaces.h" |
| 51 #include "public/testing/WebTestRunner.h" | 51 #include "public/testing/WebTestRunner.h" |
| 52 #include "public/web/WebAccessibilityNotification.h" | 52 #include "public/web/WebAccessibilityEnums.h" |
| 53 #include "public/web/WebAccessibilityObject.h" | 53 #include "public/web/WebAccessibilityObject.h" |
| 54 #include "public/web/WebCachedURLRequest.h" | 54 #include "public/web/WebCachedURLRequest.h" |
| 55 #include "public/web/WebConsoleMessage.h" | 55 #include "public/web/WebConsoleMessage.h" |
| 56 #include "public/web/WebDataSource.h" | 56 #include "public/web/WebDataSource.h" |
| 57 #include "public/web/WebDeviceOrientationClientMock.h" | 57 #include "public/web/WebDeviceOrientationClientMock.h" |
| 58 #include "public/web/WebDocument.h" | 58 #include "public/web/WebDocument.h" |
| 59 #include "public/web/WebElement.h" | 59 #include "public/web/WebElement.h" |
| 60 #include "public/web/WebFrame.h" | 60 #include "public/web/WebFrame.h" |
| 61 #include "public/web/WebGeolocationClientMock.h" | 61 #include "public/web/WebGeolocationClientMock.h" |
| 62 #include "public/web/WebHistoryItem.h" | 62 #include "public/web/WebHistoryItem.h" |
| (...skipping 748 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 811 { | 811 { |
| 812 invalidateAll(); | 812 invalidateAll(); |
| 813 discardBackingStore(); | 813 discardBackingStore(); |
| 814 } | 814 } |
| 815 | 815 |
| 816 void WebTestProxyBase::didAutoResize(const WebSize&) | 816 void WebTestProxyBase::didAutoResize(const WebSize&) |
| 817 { | 817 { |
| 818 invalidateAll(); | 818 invalidateAll(); |
| 819 } | 819 } |
| 820 | 820 |
| 821 void WebTestProxyBase::postAccessibilityNotification(const WebKit::WebAccessibil
ityObject& obj, WebKit::WebAccessibilityNotification notification) | 821 void WebTestProxyBase::postAccessibilityNotification(const WebKit::WebAccessibil
ityObject& obj, WebKit::AXNotification notification) |
| 822 { | 822 { |
| 823 if (notification == WebKit::WebAccessibilityNotificationFocusedUIElementChan
ged) | 823 if (notification == WebKit::AXFocus) |
| 824 m_testInterfaces->accessibilityController()->setFocusedElement(obj); | 824 m_testInterfaces->accessibilityController()->setFocusedElement(obj); |
| 825 | 825 |
| 826 const char* notificationName; | 826 const char* notificationName; |
| 827 switch (notification) { | 827 switch (notification) { |
| 828 case WebKit::WebAccessibilityNotificationActiveDescendantChanged: | 828 case WebKit::AXActiveDescendantChanged: |
| 829 notificationName = "ActiveDescendantChanged"; | 829 notificationName = "ActiveDescendantChanged"; |
| 830 break; | 830 break; |
| 831 case WebKit::WebAccessibilityNotificationAutocorrectionOccured: | 831 case WebKit::AXAlert: |
| 832 notificationName = "Alert"; |
| 833 break; |
| 834 case WebKit::AXAriaAttributeChanged: |
| 835 notificationName = "AriaAttributeChanged"; |
| 836 break; |
| 837 case WebKit::AXAutocorrectionOccured: |
| 832 notificationName = "AutocorrectionOccured"; | 838 notificationName = "AutocorrectionOccured"; |
| 833 break; | 839 break; |
| 834 case WebKit::WebAccessibilityNotificationCheckedStateChanged: | 840 case WebKit::AXBlur: |
| 841 notificationName = "Blur"; |
| 842 break; |
| 843 case WebKit::AXCheckedStateChanged: |
| 835 notificationName = "CheckedStateChanged"; | 844 notificationName = "CheckedStateChanged"; |
| 836 break; | 845 break; |
| 837 case WebKit::WebAccessibilityNotificationChildrenChanged: | 846 case WebKit::AXChildrenChanged: |
| 838 notificationName = "ChildrenChanged"; | 847 notificationName = "ChildrenChanged"; |
| 839 break; | 848 break; |
| 840 case WebKit::WebAccessibilityNotificationFocusedUIElementChanged: | 849 case WebKit::AXFocus: |
| 841 notificationName = "FocusedUIElementChanged"; | 850 notificationName = "Focus"; |
| 842 break; | 851 break; |
| 843 case WebKit::WebAccessibilityNotificationLayoutComplete: | 852 case WebKit::AXHide: |
| 853 notificationName = "Hide"; |
| 854 break; |
| 855 case WebKit::AXInvalidStatusChanged: |
| 856 notificationName = "InvalidStatusChanged"; |
| 857 break; |
| 858 case WebKit::AXLayoutComplete: |
| 844 notificationName = "LayoutComplete"; | 859 notificationName = "LayoutComplete"; |
| 845 break; | 860 break; |
| 846 case WebKit::WebAccessibilityNotificationLoadComplete: | 861 case WebKit::AXLiveRegionChanged: |
| 862 notificationName = "LiveRegionChanged"; |
| 863 break; |
| 864 case WebKit::AXLoadComplete: |
| 847 notificationName = "LoadComplete"; | 865 notificationName = "LoadComplete"; |
| 848 break; | 866 break; |
| 849 case WebKit::WebAccessibilityNotificationSelectedChildrenChanged: | 867 case WebKit::AXLocationChanged: |
| 868 notificationName = "LocationChanged"; |
| 869 break; |
| 870 case WebKit::AXMenuListItemSelected: |
| 871 notificationName = "MenuListItemSelected"; |
| 872 break; |
| 873 case WebKit::AXMenuListValueChanged: |
| 874 notificationName = "MenuListValueChanged"; |
| 875 break; |
| 876 case WebKit::AXRowCollapsed: |
| 877 notificationName = "RowCollapsed"; |
| 878 break; |
| 879 case WebKit::AXRowCountChanged: |
| 880 notificationName = "RowCountChanged"; |
| 881 break; |
| 882 case WebKit::AXRowExpanded: |
| 883 notificationName = "RowExpanded"; |
| 884 break; |
| 885 case WebKit::AXScrolledToAnchor: |
| 886 notificationName = "ScrolledToAnchor"; |
| 887 break; |
| 888 case WebKit::AXSelectedChildrenChanged: |
| 850 notificationName = "SelectedChildrenChanged"; | 889 notificationName = "SelectedChildrenChanged"; |
| 851 break; | 890 break; |
| 852 case WebKit::WebAccessibilityNotificationSelectedTextChanged: | 891 case WebKit::AXSelectedTextChanged: |
| 853 notificationName = "SelectedTextChanged"; | 892 notificationName = "SelectedTextChanged"; |
| 854 break; | 893 break; |
| 855 case WebKit::WebAccessibilityNotificationValueChanged: | 894 case WebKit::AXShow: |
| 856 notificationName = "ValueChanged"; | 895 notificationName = "Show"; |
| 857 break; | 896 break; |
| 858 case WebKit::WebAccessibilityNotificationScrolledToAnchor: | 897 case WebKit::AXTextChanged: |
| 859 notificationName = "ScrolledToAnchor"; | |
| 860 break; | |
| 861 case WebKit::WebAccessibilityNotificationLiveRegionChanged: | |
| 862 notificationName = "LiveRegionChanged"; | |
| 863 break; | |
| 864 case WebKit::WebAccessibilityNotificationMenuListItemSelected: | |
| 865 notificationName = "MenuListItemSelected"; | |
| 866 break; | |
| 867 case WebKit::WebAccessibilityNotificationMenuListValueChanged: | |
| 868 notificationName = "MenuListValueChanged"; | |
| 869 break; | |
| 870 case WebKit::WebAccessibilityNotificationRowCountChanged: | |
| 871 notificationName = "RowCountChanged"; | |
| 872 break; | |
| 873 case WebKit::WebAccessibilityNotificationRowCollapsed: | |
| 874 notificationName = "RowCollapsed"; | |
| 875 break; | |
| 876 case WebKit::WebAccessibilityNotificationRowExpanded: | |
| 877 notificationName = "RowExpanded"; | |
| 878 break; | |
| 879 case WebKit::WebAccessibilityNotificationInvalidStatusChanged: | |
| 880 notificationName = "InvalidStatusChanged"; | |
| 881 break; | |
| 882 case WebKit::WebAccessibilityNotificationTextChanged: | |
| 883 notificationName = "TextChanged"; | 898 notificationName = "TextChanged"; |
| 884 break; | 899 break; |
| 885 case WebKit::WebAccessibilityNotificationAriaAttributeChanged: | 900 case WebKit::AXTextInserted: |
| 886 notificationName = "AriaAttributeChanged"; | 901 notificationName = "TextInserted"; |
| 887 break; | 902 break; |
| 888 default: | 903 case WebKit::AXTextRemoved: |
| 889 notificationName = "UnknownNotification"; | 904 notificationName = "TextRemoved"; |
| 905 break; |
| 906 case WebKit::AXValueChanged: |
| 907 notificationName = "ValueChanged"; |
| 890 break; | 908 break; |
| 891 } | 909 } |
| 892 | 910 |
| 893 m_testInterfaces->accessibilityController()->notificationReceived(obj, notif
icationName); | 911 m_testInterfaces->accessibilityController()->notificationReceived(obj, notif
icationName); |
| 894 | 912 |
| 895 if (m_testInterfaces->accessibilityController()->shouldLogAccessibilityEvent
s()) { | 913 if (m_testInterfaces->accessibilityController()->shouldLogAccessibilityEvent
s()) { |
| 896 string message("AccessibilityNotification - "); | 914 string message("AccessibilityNotification - "); |
| 897 message += notificationName; | 915 message += notificationName; |
| 898 | 916 |
| 899 WebKit::WebNode node = obj.node(); | 917 WebKit::WebNode node = obj.node(); |
| (...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1474 | 1492 |
| 1475 void WebTestProxyBase::resetInputMethod() | 1493 void WebTestProxyBase::resetInputMethod() |
| 1476 { | 1494 { |
| 1477 // If a composition text exists, then we need to let the browser process | 1495 // If a composition text exists, then we need to let the browser process |
| 1478 // to cancel the input method's ongoing composition session. | 1496 // to cancel the input method's ongoing composition session. |
| 1479 if (m_webWidget) | 1497 if (m_webWidget) |
| 1480 m_webWidget->confirmComposition(); | 1498 m_webWidget->confirmComposition(); |
| 1481 } | 1499 } |
| 1482 | 1500 |
| 1483 } | 1501 } |
| OLD | NEW |