Updated test cases for increased coverage
[platform/core/uifw/dali-toolkit.git] / automated-tests / src / dali-toolkit / dali-toolkit-test-utils / toolkit-accessibility-adaptor.h
index 900f374..744f971 100644 (file)
@@ -1,11 +1,8 @@
-// Prevent normal accessibility adaptor declaration from loading
-#define __DALI_ACCESSIBILITY_ADAPTOR_H__
-
-#ifndef __DALI_TOOLKIT_ACCESSIBILITY_ADAPTOR_H__
-#define __DALI_TOOLKIT_ACCESSIBILITY_ADAPTOR_H__
+#ifndef __DALI_TEST_TOOLKIT_ACCESSIBILITY_ADAPTOR_H__
+#define __DALI_TEST_TOOLKIT_ACCESSIBILITY_ADAPTOR_H__
 
 /*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  */
 
 // EXTERNAL INCLUDES
-#include <string>
-#include <dali/public-api/object/base-handle.h>
-#include <dali/public-api/events/touch-point.h>
+#include <dali/devel-api/adaptor-framework/accessibility-adaptor.h>
+#include <dali/integration-api/events/pan-gesture-event.h>
 
-namespace Dali
-{
-namespace Internal
-{
-namespace Adaptor
+namespace Test
 {
-class AccessibilityAdaptor;
-}
-}
-class AccessibilityActionHandler;
-class AccessibilityGestureHandler;
-class TouchPoint;
-
-/**
- * This creates a stubbed AccessibilityAdaptor so that internal Toolkit Adaptor calls work.
- */
-class AccessibilityAdaptor : public BaseHandle
+namespace AccessibilityAdaptor
 {
-public: // Construction & Destruction
-  AccessibilityAdaptor();
-  ~AccessibilityAdaptor();
-
-public: // Mock object setup.
-
-  void MockSetReadPosition( Vector2& position );
-
-public: // Getters
-
-  static AccessibilityAdaptor Get();
-
-  Vector2 GetReadPosition();
-  bool IsEnabled() const;
-  void SetActionHandler(AccessibilityActionHandler& handler);
-  void SetGestureHandler(AccessibilityGestureHandler& handler);
-
-  bool HandleActionNextEvent();
-  bool HandleActionPreviousEvent();
-  bool HandleActionActivateEvent();
-  bool HandleActionReadEvent(unsigned int x, unsigned int y, bool allowReadAgain);
-  bool HandleActionReadNextEvent();
-  bool HandleActionReadPreviousEvent();
-  bool HandleActionUpEvent();
-  bool HandleActionDownEvent();
-  bool HandleActionClearFocusEvent();
-  bool HandleActionScrollEvent(TouchPoint& point, unsigned long timeStamp);
-  bool HandleActionBackEvent();
-  void HandleActionEnableEvent();
-  void HandleActionDisableEvent();
-  bool HandleActionScrollUpEvent();
-  bool HandleActionScrollDownEvent();
-  bool HandleActionPageLeftEvent();
-  bool HandleActionPageRightEvent();
-  bool HandleActionPageUpEvent();
-  bool HandleActionPageDownEvent();
-  bool HandleActionMoveToFirstEvent();
-  bool HandleActionMoveToLastEvent();
-  bool HandleActionReadFromTopEvent();
-  bool HandleActionReadFromNextEvent();
-  bool HandleActionZoomEvent();
-  bool HandleActionReadIndicatorInformationEvent();
-  bool HandleActionReadPauseResumeEvent();
-  bool HandleActionStartStopEvent();
 
-  AccessibilityAdaptor( Internal::Adaptor::AccessibilityAdaptor* adaptor );
-};
+void MockSetReadPosition( Dali::AccessibilityAdaptor adaptor, Dali::Vector2& position );
+void SetEnabled( Dali::AccessibilityAdaptor adaptor, bool enabled);
+void SendPanGesture( Dali::AccessibilityAdaptor adaptor, const Dali::Integration::PanGestureEvent& panEvent );
 
-} // namespace Dali
+} // namespace AccessibilityAdaptor
+} // namespace Test
 
-#endif // __DALI_TOOLKIT_ACCESSIBILITY_ADAPTOR_H__
+#endif //