+int UtcDaliWebViewProperty9(void)
+{
+ // SCROLL_POSITION
+ ToolkitTestApplication application;
+
+ WebView view = WebView::New();
+ DALI_TEST_CHECK( view );
+
+ // Check default value
+ Dali::Vector2 output = Dali::Vector2::ONE;
+ view.GetProperty( WebView::Property::SCROLL_POSITION ).Get( output );
+ DALI_TEST_CHECK( output.x == 0 && output.y == 0 );
+
+ // Check Set/GetProperty
+ Dali::Vector2 testValue = Dali::Vector2( 100, 100 );
+ view.SetProperty( WebView::Property::SCROLL_POSITION, testValue );
+ view.GetProperty( WebView::Property::SCROLL_POSITION ).Get( output );
+ DALI_TEST_EQUALS( output, testValue, TEST_LOCATION );
+
+ // Check default value of scroll size
+ output = Dali::Vector2::ONE;
+ view.GetProperty( WebView::Property::SCROLL_SIZE ).Get( output );
+ DALI_TEST_CHECK( output.x == 500 && output.y == 500 );
+
+ // Check default value of content size
+ output = Dali::Vector2::ONE;
+ view.GetProperty( WebView::Property::CONTENT_SIZE ).Get( output );
+ DALI_TEST_CHECK( output.x == 500 && output.y == 500 );
+
+ END_TEST;
+}
+
+int UtcDaliWebViewScrollBy(void)
+{
+ ToolkitTestApplication application;
+
+ WebView view = WebView::New();
+ DALI_TEST_CHECK( view );
+
+ // load url.
+ ConnectionTracker* testTracker = new ConnectionTracker();
+ view.ScrollEdgeReachedSignal().Connect( &OnScrollEdgeReached );
+ bool signal1 = false;
+ view.ConnectSignal( testTracker, "scrollEdgeReached", CallbackFunctor(&signal1) );
+ DALI_TEST_EQUALS( gScrollEdgeReachedCallbackCalled, 0, TEST_LOCATION );
+
+ view.LoadUrl( TEST_URL1 );
+ Test::EmitGlobalTimerSignal();
+
+ // set scroll position.
+ Dali::Vector2 output = Dali::Vector2::ONE;
+ Dali::Vector2 testValue = Dali::Vector2( 100, 100 );
+ view.SetProperty( WebView::Property::SCROLL_POSITION, testValue );
+ view.GetProperty( WebView::Property::SCROLL_POSITION ).Get( output );
+ DALI_TEST_EQUALS( output, testValue, TEST_LOCATION );
+
+ // scroll by and trigger scrollEdgeReached event.
+ view.ScrollBy( 50, 50 );
+ view.GetProperty( WebView::Property::SCROLL_POSITION ).Get( output );
+ DALI_TEST_CHECK( output.x == 150 && output.y == 150 );
+ DALI_TEST_EQUALS( gScrollEdgeReachedCallbackCalled, 1, TEST_LOCATION );
+ DALI_TEST_CHECK( signal1 );
+
+ END_TEST;
+}
+