Changing test page loading type in utc_blink_ewk_view_screenshot_contents_get* tests
authorLukasz Krok <l.krok@samsung.com>
Thu, 22 Jan 2015 15:05:38 +0000 (16:05 +0100)
committerYoungsoo Choi <kenshin.choi@samsung.com>
Tue, 10 Jul 2018 06:57:09 +0000 (06:57 +0000)
Instead of google.com, static html page code will be loaded.
The reason behind this change is that sometimes test failed
because of connection problems, for instance when a script rebooted
device and did not manage to establish internet connection before
executing the test.

Bug: http://107.108.218.239/bugzilla/show_bug.cgi?id=10624
Reviewed by: Antonio Gomes, Janusz Majnert, Piotr Tworek

Change-Id: Ideca7340cf8a196d98bf8236ee58a49800f7010e
Signed-off-by: Lukasz Krok <l.krok@samsung.com>
tizen_src/ewk/unittest/utc_blink_ewk_view_screenshot_contents_get_func.cpp

index c563a5c..2dc9c68 100755 (executable)
@@ -17,18 +17,21 @@ protected:
   static const char*const url;
 };
 
-const char*const utc_blink_ewk_view_screenshot_contents_get::url="http://www.google.com";
-
 /**
  * @brief Checking whether the evas image object of the specified viewArea of page is returned.
  */
 
 TEST_F(utc_blink_ewk_view_screenshot_contents_get, POS_TEST)
 {
-  Eina_Bool url_result = ewk_view_url_set(GetEwkWebView(), url);
-  Eina_Bool result = EINA_FALSE;
+  char htmlBuffer[] = "<html>"
+                        "<head></head>"
+                        "<body>"
+                        "</body>"
+                      "</html>";
+
+  bool result = ewk_view_html_string_load(GetEwkWebView(), htmlBuffer, NULL, NULL);
 
-  if (!url_result)
+  if (!result)
     utc_fail();
 
   if (Success!=EventLoopStart())