Upstream version 7.35.139.0
[platform/framework/web/crosswalk.git] / src / xwalk / test / android / core / javatests / src / org / xwalk / core / xwview / test / XWalkViewTestBase.java
index 5555902..be87af5 100644 (file)
@@ -502,4 +502,22 @@ public class XWalkViewTestBase
 
         return viewPair;
     }
+
+    protected String getUrlOnUiThread() throws Exception {
+        return runTestOnUiThreadAndGetResult(new Callable<String>() {
+            @Override
+            public String call() throws Exception {
+                return mXWalkView.getUrl();
+            }
+        });
+    }
+
+    protected void clearCacheOnUiThread(final boolean includeDiskFiles) throws Exception {
+        getInstrumentation().runOnMainSync(new Runnable() {
+            @Override
+            public void run() {
+                mXWalkView.clearCache(includeDiskFiles);
+            }
+        });
+    }
 }